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

Pivot table sum of divided values

Hello,

I suppose solution for this is very simple, but I just cant see it yet...

I have one pivot table, and in expression:

=sum(Val1)/sum(Val2)

ScreenShot064.png

Now I just want to show a pivot table, which will show sum of all results for all Blue items, so I removed Item dimension:

ScreenShot065.png

But values do not show what I want. It of course sums up all Val1 and divides by total sum of all Val2

But as I stated before I would like to see  sum of all results for all Blue items form previous table

So for example

Blue for Q1-2014 should be 0.8 + 1.0 + 0.8 + 2.0 + 0.9 = 5,6

How to achieve that?

I am attaching same qvw as well

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try sum(aggr(sum(Val1)/sum(Val2),Qtr,Item, Color))


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Try sum(aggr(sum(Val1)/sum(Val2),Qtr,Item, Color))


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks! It works as intended.