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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
karolina_
Creator II
Creator II

sum of rows in pivot when using column()

Hi All

I know help says "Pivot table totals are always calculated as expression total."
But maybe someone findout workaround for this so I don't need to change expression:

Column(3)-Column(4)-if(Column(2),(Column(5)-Column(6))*Column(1),0

to huge sums with aggr?

Each of column is set analysis with variables.

Simple example to play with attached.

10 Replies
karolina_
Creator II
Creator II
Author

At least it accepts variables I use in columns:

sum(aggr(

sum(aggr($(eExpr3),[DIM1],[DIM2]))

-sum(aggr($(eExpr4),[DIM1],[DIM2]))

-if(sum(aggr($(eExpr2),[DIM1],[DIM2])),

(sum(aggr($(eExpr3),[DIM1],[DIM2]))

/sum(aggr($(eExpr1),[DIM1],[DIM2]))

-sum(aggr($(eExpr4),[DIM1],[DIM2]))

/  sum(aggr( $(eExpr2),[DIM1],[DIM2])) )

*sum(aggr($(eExpr1),[DIM1],[DIM2]))

,0)

,[DIM1],[DIM2]))

Thanks Frank