Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

please correct this sum expression

I am trying to sum the patient based on their gender and status  and wrote this formula

sum([Patient count])/sum(TOTAL{<Gender{,Status}>}[Patient count])

it is saying error in set expression

please let me know the correct syntax,

regards,

Anuradha

7 Replies
YoussefBelloum
Champion
Champion

Hi,

maybe this:

sum([Patient count])/sum(TOTAL{<Gender,Status}>}[Patient count])

swuehl
MVP
MVP

You need to decide if you want to limit the aggregation scope regarding the chart dimensions or selections:

I guess you want to ignore chart dimensions besides Gender and Status:

=sum([Patient count]) / sum(TOTAL<Gender,Status> [Patient count])


The Aggregation Scope

YoussefBelloum
Champion
Champion

Hi Stefan, by suggesting your above expression, I think you mean: you want to limit the aggregation score regarding the chart dimension.. I'm I wrong ?

because to ignore chart dimensions, we need to exclude them in set analysis, right ?

tresesco
MVP
MVP

because to ignore chart dimensions, we need to exclude them in set analysis, right ?

NO.

Rather, to ignore chart dimensions, we need to use TOTAL qualifier with the dimensions accordingly. Set analysis has nothing to do with dimension ignorance but selection ignorance, irrespective of chart dimensions.

Anonymous
Not applicable
Author

thanks that is working

YoussefBelloum
Champion
Champion

May bad, I was thinking about dimension selection ignorance when writing exclude chart dimensions.. it is clearer now

pintucs20
Contributor III
Contributor III

Hi Tiwary,

Please try below mentioned

sum([Patient count]) / sum(TOTAL<Gender,Status> [Patient count])


Regards

Pintu Pandey