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: 
meilim26
Contributor
Contributor

Average of a Distinct Value of 2 dimension

Hi All, 

I have 2 expression in my report....

Individual Cluster and Lifestage = count({$} distinct VisitParty)

Benchmark (avg) for the same Lifestage across different Cluster  = aggr(nodistinct avg(aggr(count (distinct VisitParty), Branch_Cluster, Visit_Lifestage)), Visit_Lifestage)

The above 2 expression gave me correct answer of what i want... But, when i clicked on a selected Branch, my benchmark will have the same value as the Individual Cluster and Lifestage, where and how should i insert TOTAL/{1} or anything to make the Benchmark number stay the same with regardless of what filter i choose? 

 

TQ

1 Solution

Accepted Solutions
MayilVahanan

Hi

Try like below

 

 = aggr(nodistinct avg({1}aggr(count ({1}distinct VisitParty), Branch_Cluster, Visit_Lifestage)), Visit_Lifestage)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

1 Reply
MayilVahanan

Hi

Try like below

 

 = aggr(nodistinct avg({1}aggr(count ({1}distinct VisitParty), Branch_Cluster, Visit_Lifestage)), Visit_Lifestage)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.