Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

kmstephenson
New Contributor III

straight table with % with y/n indicator as columns

Hi All,

I create multiple straight tables with % with yes/no indicator set to yes as column expressions.

For example:

COUNT(DISTINCT {<FlagA={'Yes'}>} Key)/COUNT(DISTINCT Key)


This works unless I have selected FlagA='No' in the dashboard. If I have FlagA='No' selected, my table still shows % of patients with FlagA. So instead, I used code:

IF(GetFieldSelections(FlagA)='No',0,COUNT(DISTINCT {<FlagA={'Yes'}>} Key)/COUNT(DISTINCT Key))

Is this the most efficient code I should be using or is there another option within set analysis?

Thanks!

Tina

1 Solution

Accepted Solutions
MVP
MVP

Re: straight table with % with y/n indicator as columns

Try this:

COUNT(DISTINCT {<FlagA *= {'Yes'}>} Key)/COUNT(DISTINCT Key)

Implicit Set Operators

1 Reply
MVP
MVP

Re: straight table with % with y/n indicator as columns

Try this:

COUNT(DISTINCT {<FlagA *= {'Yes'}>} Key)/COUNT(DISTINCT Key)

Implicit Set Operators