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

%'s in Pivot Table

I'm using a pivot table to group costs by two dimensions. 

Situation:

- When dimensions are expanded %'s are calculated correctly.

- When dimensions are contracted %'s are incorrect.  QV is summing %'s instead of calculating them at total level.

Any idea of how can this be fixed?

This is the Expression calculation:

sum({<WO_State={'Closed'}>}[Cost of Scrap]/VOP)

As you can see, I'm using a Set Modifier.

5 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Try:

sum({<WO_State={'Closed'}>}[Cost of Scrap]) / sum({<WO_State={'Closed'}>}VOP)


Hope this helps,


Jason

wgonzalez
Partner - Creator
Partner - Creator
Author

Hi Jason,

I've alread tried that, but results are blank.  No information at all.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Can you post a sample app?

Not sure this will give the right result, but try:

sum({<WO_State={'Closed'}>} TOTAL [Cost of Scrap]/VOP)

wgonzalez
Partner - Creator
Partner - Creator
Author

Weird thing, this is what worked good:

[Cost of Scrap] / VOP

No set modifier, no SUM function.  It's weird since I wanted to restrict the data set to those whos value in field "WO_State" is "Closed".  The set modifier works fine for other calculations or fields in the same pivot.  Only for %'s need to be taken out.

Any comments?

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Can you post your app?