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: 
BoXiangWang
Contributor III
Contributor III

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 III
Contributor III
Author

Thanks, it's what I need!