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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Percentage subtotal

Hello,

I need to distribute 100% by each month and also by Brand, so the Brand should be the 100%.

First i tried with this formula wich is correct by month:  

sum (NUM_PAX_BKD_LB)/ sum (total <[Quarter Cruise]>(NUM_PAX_BKD_LB) )

And this is the result 

Quarter CruiseQ1Q1Q2Q2Q3Q3Q4Q4
BrandFare Type#%Month#%Month#%Month#%Month
Total 10.372100%15.627100%26.778100%7.662100%
xxxTotal5.80956%7.08145%12.59847%2.51233%
xxxGRP6046%2942%340%--
xxxHM460%4193%1.0324%4866%
xxxIND5.15950%6.36841%11.53243%2.02626%
YYYTotal4.56344%8.54655%14.18053%5.15067%
YYYGRP9129%1.1657%----
YYYHM160%220%2311%1121%
YYYIND3.63535%7.35947%13.94952%5.03866%

But what i need is also to fix the Brand and get a tablke like this one:

     Thanks!

Quarter CruiseQ1Q1Q2Q2Q3Q3Q4Q4
BrandFare Type#%Month#%Month#%Month#%Month
xxxTotal5.809100%7.081100%12.598100%2.512100%
xxxGRP60410%2944%340%--
xxxHM461%4196%1.0328%48619%
xxxIND5.15989%6.36890%11.53292%2.02681%
YYYTotal4.563100%8.546100%14.180100%5.150100%
YYYGRP91220%1.16514%----
YYYHM160%220%2312%1122%
YYYIND3.63580%7.35986%13.94998%5.038

98%

Labels (1)
1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

sum (NUM_PAX_BKD_LB)/ sum (total <[Quarter Cruise], Brand>(NUM_PAX_BKD_LB) )


or


sum (NUM_PAX_BKD_LB)/ sum (total <[Quarter Cruise], Brand, [Fare Type]>(NUM_PAX_BKD_LB) )

View solution in original post

2 Replies
MK_QSL
MVP
MVP

sum (NUM_PAX_BKD_LB)/ sum (total <[Quarter Cruise], Brand>(NUM_PAX_BKD_LB) )


or


sum (NUM_PAX_BKD_LB)/ sum (total <[Quarter Cruise], Brand, [Fare Type]>(NUM_PAX_BKD_LB) )

Not applicable
Author

Thanks!