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: 
yelin_nyu
Creator
Creator

% of division total in pivot table dimension

I used following formula in the pivotal table dimension to find the area sales as of % of the division.

aggr(sum({<FiscalYear={2015},FiscalMonth={"4")>}Sales),Division,Area)

/
aggr(sum({<FiscalYear={2015},FiscalSeq={"4"}>} Sales), Division)

I am not getting the result for some reason, out of three divisions, I'm only seeing values for one area, and they are null for all other area. I wonder what's wrong with my formula. I tried top and bottom part of the division individually, and they all worked perfect fine. but when I tried to do the division, then I am not getting the value in every area.

did I do something wrong here? what's the best approach of creating % of division total ( not the grand total, as there are number of division) in pivot table DIMENSION, not expression (for client request, I cannot do it as an expression....)

thanks

1 Solution

Accepted Solutions
preminqlik
Specialist II
Specialist II


try this :



aggr(sum({<FiscalYear={2015},FiscalMonth={"4")>}Sales),Division,Area)

/
aggr(sum({<FiscalYear={2015},FiscalSeq={"4"}>} total <Area> Sales),Division,Area)

View solution in original post

2 Replies
its_anandrjs

Try this expression

aggr(sum({<FiscalYear={2015},FiscalMonth={"4")>}Sales),Division,Area)

/
aggr(sum(TOTAL {<FiscalYear={2015},FiscalSeq={"4"}>} Sales), Division)

Or

( Expression1  / Expression2 )  * 100

Regards

Anand

preminqlik
Specialist II
Specialist II


try this :



aggr(sum({<FiscalYear={2015},FiscalMonth={"4")>}Sales),Division,Area)

/
aggr(sum({<FiscalYear={2015},FiscalSeq={"4"}>} total <Area> Sales),Division,Area)