Combing two SUM calculations into one

[ad_1]

Hi,

Having some trouble which no amount of googling seems to be helping me with 🙂

I’m basically trying to perform two calculations in one, to create output that I can use within a WordPress post.

Both calculations work on there own, but I’m absolutely stumped on how to get them to both work in one.

Is it possible to combine these into one calculation?

SUM((fieldname7*OctGoSpecial)/fieldname8*fieldname12,(fieldname7*OctGoStandard)/fieldname8*fieldname13)*fieldname80*4,

SUM(fieldname43*OctGoStandard,fieldname48*OctGoSpecial,1*OctGoSC)*28

I’m then using them in some code like this (this is just a snippet):

var results = {

        ‘#OctGoHomeChargePM’ : SUM(((fieldname7*OctGoSpecial)/fieldname8*fieldname12,(fieldname7*OctGoStandard)/fieldname8*fieldname13)*fieldname80*4,(fieldname43*OctGoStandard,fieldname48*OctGoSpecial,1*OctGoSC)*28),

 To enable me to post the results into a page, which works really well when the calculation is correct.

Any help appreciated!

Thanks,
Dave.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer