Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vijayit43
Creator
Creator

SUM After Distinct Count

Dear All,

In My Qv  we create pivot dimension field is state,DistributorCode,RetailerCode,brand and expression field is count(distinct brand) when we expend brand level then give right answer which we want and when we collapse state level then also distinct count but we want when we collapse state level then distinct count only retailercode level after that it sum that count how to possible please help ..

for refrence attach qv

1 Solution

Accepted Solutions
preminqlik
Specialist II
Specialist II

hi use this exp

hope this helps you

sum(aggr(count (distinct Brand),State,DistributorCode,RetailerCode,Brand))

View solution in original post

2 Replies
preminqlik
Specialist II
Specialist II

hi use this exp

hope this helps you

sum(aggr(count (distinct Brand),State,DistributorCode,RetailerCode,Brand))

jagan
Luminary Alumni
Luminary Alumni

Hi Vijay,

I think count (distinct RetailerCode) makes sense, you will get the required values.

Regards,

Jagan.