Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
dafnis14
Specialist
Specialist

Control expression total in pivot table

Hi,

In a pivot table, I use the following expression to show difference which will be presented in % :

[Actual Demand]/[Optimal Demand]-1

But in the Total, it shows the sum of all the differences.

Is it possible to control this behavior to show the average in the total?

Thanks!

1 Solution

Accepted Solutions
rubenmarin

Hard to say without a sample.. I would guess something like this will help you:

If(Dimensionality()>0, [Actual Demand]/[Optimal Demand]-1,

Avg(Aggr([Actual Demand]/[Optimal Demand]-1, Dimension1, Dimension2...))

)

View solution in original post

2 Replies
rubenmarin

Hard to say without a sample.. I would guess something like this will help you:

If(Dimensionality()>0, [Actual Demand]/[Optimal Demand]-1,

Avg(Aggr([Actual Demand]/[Optimal Demand]-1, Dimension1, Dimension2...))

)

dafnis14
Specialist
Specialist
Author

Thank You!