Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Want a total sum of my expression at thhe top of my chart/pivot table

Hey guys, my expression goes as followed:

IF(Sum({<[Kontonummer]>} [Bokfört belopp]) > 0 ,Sum([Bokfört belopp]) * Sum([Andel av kapital]))

and it works just fine. The problem i have though is how do i get a total sum from all these values at the top of the pivot table?

Is a Aggr function useful at this point?

Kind Regards

D.Z

1 Solution

Accepted Solutions
Not applicable
Author

Hey guys. This is how it looks like with my previous expression:
Capture1.PNG

as you can see the multiple expression works fine as "bokfört belopp" multiplies with "andel av kapital" and makes a correct value but no total sum.

Sunny's expression on the other hand looks like this:
Capture2.PNG

as you can see here i get a total sum but the multiple function doesn't work as it should.

for example you can see that 86.219.696,09 * 2 is not 43.153.347,95.. and so on.


sunindiaColin_Albert

View solution in original post

9 Replies
sunny_talwar

For sure it is:

Sum(Aggr(IF(Sum({<[Kontonummer]>} [Bokfört belopp]) > 0 ,Sum([Bokfört belopp]) * Sum([Andel av kapital])), YourChartDimensions))

Not applicable
Author

Hmm, if i type that expression in i get different data into the pivot table compered to the one i have.

sunny_talwar

Really? the numbers are different? Did you list out all the dimensions?

Colin-Albert

To get the totals on top, Click "Show Partial Sums" on the Presentation sheet of the chart for each dimension you wish to total, and select the "Subtotals on Top" option

TotalsOnTop.JPG

Not applicable
Author

Hey Colin. I allready got those checked in. The total tab is shown but no values inside are shown.

Colin-Albert

Can you post the full expression you tested in response to Sunny T's AGGR suggestion?

Did you replace  YourChartDimensions with a comma separated list of all of your dimensions using the correct dimension names?

     SALESREP, Year, Quarter etc

Not applicable
Author

Hey guys. This is how it looks like with my previous expression:
Capture1.PNG

as you can see the multiple expression works fine as "bokfört belopp" multiplies with "andel av kapital" and makes a correct value but no total sum.

Sunny's expression on the other hand looks like this:
Capture2.PNG

as you can see here i get a total sum but the multiple function doesn't work as it should.

for example you can see that 86.219.696,09 * 2 is not 43.153.347,95.. and so on.


sunindiaColin_Albert

Not applicable
Author

Look at my answer at the bottom

Not applicable
Author

Look at my answer at the bottom