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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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

1 Solution

Accepted Solutions
sunny_talwar

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

Will you be able to share a sample?

Not applicable
Author

I create a simple example to show my question as below

sunny_talwar

This seems to work:

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

Capture.PNG

Not applicable
Author

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