Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
BoXiangWang
Contributor II
Contributor II

How to calculate subtotal in a straight table

Hi all,

I knew it should be an old topic, but after browsing some articles it is still not clear to me how to calculate the subtotals in a chart.

In my case as below, I want to let the Denominator become the sum of gender "F" and "M" of each month so that I can use it to calculate the percentage of females and males of each month.

BoXiangWang_0-1710225906409.png

 

For instance, the first row should be 53 / (53+12) since I want to have the percentage of females in Jan.

However, I don't know how to use set analysis with Total. Is there any references of ideas allowing me to achieve it without changing my data model? Thanks!

Numerator: =$(=v_ppl_count)

v_ppl_count: count(distinct Amount)

Labels (1)
1 Solution

Accepted Solutions
Rohan
Specialist
Specialist

Try this.

v_ppl_count: count(Total<Month> distinct Amount)

 

Regards,

Rohan.

View solution in original post

2 Replies
Rohan
Specialist
Specialist

Try this.

v_ppl_count: count(Total<Month> distinct Amount)

 

Regards,

Rohan.

BoXiangWang
Contributor II
Contributor II
Author

Thanks, it's what I need!