Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate Sum of total

I want to calculate sum of total for following expression

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

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

i tried

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

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

Please help on this?

3 Replies
jjordaan
Partner - Specialist
Partner - Specialist

Hi Rahul,

If I understand your question correctly in a chart you can use within the expression the setting sum of rows.

Or you can use the Aggr function to do it.

If I didn't understood your question let me know

Not applicable
Author

Hi Jeroen,

I want to calculate calculation highlighted in Red

791.246/(3.77+2.133)

In the last column i.e 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 this.

123Untitled.png

jjordaan
Partner - Specialist
Partner - Specialist

See attached file