Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get total over Calculated dimension

if I create a calculated dimension like below

if(charge<15000, 'Low charge', if(charge<50000, 'High charge', 'Med Charge')


and had 2nd dimension age_grp, which from load data


Now, I want to compute the % of age_grp within charge level like


count(distinct subject_id)/count(total <calculated charge level> distinct visit_key )


My question is how to add the calculated dimension in the count function.


Thanks

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

This seems to work:

Count(DISTINCT [subject id])/Count(DISTINCT TOTAL <charge> [subject id])

Capture.PNG

View solution in original post

4 Replies
sunny_talwar
MVP
MVP

Will you be able to share a sample?

Not applicable
Author

I create a simple example to show my question as below

sunny_talwar
MVP
MVP

This seems to work:

Count(DISTINCT [subject id])/Count(DISTINCT TOTAL <charge> [subject id])

Capture.PNG

Not applicable
Author

brilliant!!!!!!!!!!!!!11