1 Reply Latest reply: Nov 14, 2016 1:00 PM by Sunny Talwar RSS

    straight table with % with y/n indicator as columns

    Kristina Stephenson

      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?