Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
estellocrypto
Contributor
Contributor

Calculate the sum of numbers in a row of a Pivot table and display the value in a single field

I have a problem with a pivot table in Qlik Sense. I can't share the data so I recreated the problem in a table:

estellocrypto_0-1660645911764.png

 

In Qlik Sense, this is a pivot table. The light green fields are calculated by multiplying the quantity with the price and the dark green are the two light green fields added together.

What I need now is a formula that sums up all the values in the dark green row, so that in this case the result would be 50. I want to display that value in a KPI field. Is there any way I can do that in Qlik Sense?

I tried to calculate the sum of the total but it doesn't give me any result. I tried to activate the "Total" option, it doesn't display the right values at all.

Thank you for your help! 

Labels (4)
1 Reply
marcus_sommer

Your example doesn't provide any information about the data-model or the expressions in the pivot but by a "classical" data-structure something like the following should work within a KPI:

sum(aggr(sum(Price*Quantity), Product, Month))

- Marcus