Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate Sum of Total in expression

I want to calculate calculation highlighted in Red

791.246/(3.77+2.133)

In the last column name A expression i have written

=sum(

if(([Ledger Account]>=41112 AND [Ledger Account]<=41118) AND ([Cost Centre]<201),

(if([Debit/Credit]=2,[Amount in EUR]*(-1),[Amount in EUR]))))

/

(Sum ( aggr( if(([Ledger Account]>=41112 AND [Ledger Account]<=41118) AND [Cost Centre]<201,

(if([Debit/Credit]=2,[Amount in EUR]*(-1),[Amount in EUR]))),[Cost Centre],Costcentre))

+

Sum (if(([Ledger Account]=41111) or ([Ledger Account]>=41119 and [Ledger Account]<= 41130)

and ([Cost Centre]>=201),

(if([Debit/Credit]=2,[Amount in EUR]*(-1),[Amount in EUR])))))

For referance i have attached QVW file to main post pls help me on this123Untitled.png

2 Replies
erjohnso
Creator
Creator

For some reason, I get a 'document failed to load' error when trying to open your file.

However, if I understand the visual you've provided, could the calculation you are seeking be as simple as:

Column A =

sum([Material of ROM]) / (sum(total ([Material of ROM]))+sum(total ([Allocated Costs])))

sunny_talwar

the qvw file you have posted doesn't open.