Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
MVP
MVP

Re: KPI to show % Female for a particular Quarter

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)

2 Replies
MVP
MVP

Re: KPI to show % Female for a particular Quarter

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

Re: KPI to show % Female for a particular Quarter

Thanks a lot, Stefan. Worked great! 

- Ankit