Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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!