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

Sum with aggr and count in expression

Hi,

I am trying to calculate distinct count of key at customer_id and provider_id level then want a sum of these for all the providers and not just the selected provider.

 

i am using the following expression here.But apparently {<provider_id=>} before the aggr is not affecting the calculation.It is giving values for the selected provider.

sum({<provider_id=>}aggr(count (distinct(<service_status={'closed'},service_type={'regular'}> )key),customer_id,provider_id))

1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum({<provider_id>} Aggr(
Count(DISTINCT {<provider_id, service_status = {'closed'}, service_type = {'regular'}>} key)
, customer_id, provider_id))

View solution in original post

2 Replies
sunny_talwar

Try this

Sum({<provider_id>} Aggr(
Count(DISTINCT {<provider_id, service_status = {'closed'}, service_type = {'regular'}>} key)
, customer_id, provider_id))
qwerty89
Contributor III
Contributor III
Author

Thanks!!