Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
CK_WAKE
Creator
Creator

Subgroup percentage share or Subgroup total

Hi There, I want to reproduce the Column C (ACCESSORIES(%)) to a new column Replica of Column C in the below table chart, how can i achieve this.

Please note: Column B is derived using a COUNT DISTINCT FORMULA as shown below.

I tried below example but it is not working because of COUNT DISTINCT.

Sum(Value)/Sum(total <Value> [Month])

 

Country Count(DISTINCT(ACCESSORIES)) ACCESSORIES(%) Replica of Column C
USA 220,196 32.00%  
China 241,282 35.00%  
Japan 227,249 33.00%  
Total 688,727 100%  
1 Solution

Accepted Solutions
TauseefKhan
Creator III
Creator III

Hello @CK_WAKE,
Check below formulas are correct to calculate the percentage share of distinct accessories:

=Sum(Aggr(Count(DISTINCT ACCESSORIES), Country)) / Sum(TOTAL Aggr(Count(DISTINCT ACCESSORIES), Country))

** When applicable please mark the correct/appropriate replies as "solution". Please LIKE threads if the provided solution is helpful to. **

View solution in original post

2 Replies
TauseefKhan
Creator III
Creator III

Hello @CK_WAKE,
Check below formulas are correct to calculate the percentage share of distinct accessories:

=Sum(Aggr(Count(DISTINCT ACCESSORIES), Country)) / Sum(TOTAL Aggr(Count(DISTINCT ACCESSORIES), Country))

** When applicable please mark the correct/appropriate replies as "solution". Please LIKE threads if the provided solution is helpful to. **

CK_WAKE
Creator
Creator
Author

Thanks for the help it worked