Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

KPI to show % Female for a particular Quarter

Hello,

I have a data set like this:-

NameQuarterGender
AQ2Male
BQ2Male
CQ2Female
DQ2Male
EQ4Male
FQ4Female

And I am trying to show KPIs for # of Female as well as % Female for Q2, Q4 and total. Something like:-

KPI 1 : Total # Female = 6

KPI 2 : Total % Female = 33.33 %

KPI 3 : # Female for Q2 = 1

KPI 4 : % Female for Q2 = 25%

KPI 5 : # Female for Q4 = 1

KPI 6 : % Female for Q4 = 50%

Could anyone please suggest what expression to use for KPIs 1 thru 4 ? I guess I can edit 3 & 4 to get 5 & 6 (for Q4).

Thanks in anticipation!

Ankit L.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like

1)

=Count({<Gender = {'Female'}>} DISTINCT Name)

2)

=Count({<Gender = {'Female'}>} DISTINCT Name) / Count(DISTINCT Name)


3)

=Count({<Gender = {'Female'}, Quarter = {'Q2'}>} DISTINCT Name)

4)

=Count({<Gender = {'Female'}, Quarter = {'Q2'}>} DISTINCT Name) / Count({<Quarter = {'Q2'}>}DISTINCT Name)

View solution in original post

2 Replies
swuehl
MVP
MVP

Maybe like

1)

=Count({<Gender = {'Female'}>} DISTINCT Name)

2)

=Count({<Gender = {'Female'}>} DISTINCT Name) / Count(DISTINCT Name)


3)

=Count({<Gender = {'Female'}, Quarter = {'Q2'}>} DISTINCT Name)

4)

=Count({<Gender = {'Female'}, Quarter = {'Q2'}>} DISTINCT Name) / Count({<Quarter = {'Q2'}>}DISTINCT Name)

Not applicable
Author

Thanks a lot, Stefan. Worked great! 

- Ankit