Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vidyasagar159
Creator II
Creator II

100% Stacked Bar

Hello Every One,

Hope you are doing great. Can someone please help me in finding the logic for 100% stacked bar for below numerator expression.

Dimension Expressions:


  1. YEAR (Example Data: 2010,2011,2012,2013,2014). This goes to Category axis.
  2. FRUITS (Example Data: Apples, Grapes, Strawberries). This goes to COLOR's


Measure Expression:

Sum({<PLANSIZE={"More than $50"},CATEGORY={"No"}>}SALES)

Expected Result: I want the sum of all fruits to be 100% for each Year.

I tried the below expression but it is not giving the 100%.

Sum({<PLANSIZE={"More than $50"},CATEGORY={"No"}>}SALES)/ AGGR(sum(total <YEAR> SALES),YEAR,FRUITS)

Thanks,

-Vidya

1 Solution

Accepted Solutions
Digvijay_Singh

May be -

Sum({<PLANSIZE={"More than $50"},CATEGORY={"No"}>}SALES)/ AGGR(sum({<PLANSIZE={"More than $50"},CATEGORY={"No"}>} total <YEAR> SALES),YEAR,FRUITS)

View solution in original post

2 Replies
Digvijay_Singh

May be -

Sum({<PLANSIZE={"More than $50"},CATEGORY={"No"}>}SALES)/ AGGR(sum({<PLANSIZE={"More than $50"},CATEGORY={"No"}>} total <YEAR> SALES),YEAR,FRUITS)

vidyasagar159
Creator II
Creator II
Author

Thanks, Vijay. Its really helpful.

-Vidya