
Re: Count total distinct
Ruan Haese Nov 13, 2017 4:33 AM (in response to Ruan Haese )Tried this as well but came up with the wrong values
=SUM(TOTAL Aggr( Count(Distinct DimB), DimA ))

Re: Count total distinct
Quy Nguyen Nov 13, 2017 4:41 AM (in response to Ruan Haese )Hi Ruan,
As i can see there are 3 distinct values of DimB on your data.
And this expression: COUNT(DISTINCT TOTAL DimB) will return 3.
If you want the result is 5, try this: COUNT(TOTAL DimB)
Best.


Re: Count total distinct
Ruan Haese Nov 13, 2017 6:20 AM (in response to Toni Kautto )Thanks, I agree it makes sense,
but as I mentioned earlier it returns the wrong value.
Edit: I played around with the data I provided and this solution
did return the correct values, so I'll mark it as correct.
Not quite sure why it didn't apply to my data though.
Thanks for the help.
Will play around with the AGGR function more.



Re: Count total distinct
Shraddha Gajare Nov 13, 2017 4:36 AM (in response to Ruan Haese )COUNT(DISTINCT TOTAL DimB) will give you 3
COUNT( TOTAL DimB) will give you 5
Try
COUNT(DISTINCT DimB) / COUNT(TOTAL DimB)

Re: Count total distinct
Toni Kautto Nov 13, 2017 4:39 AM (in response to Shraddha Gajare )That wouldn't give the distinct count in the denominator. I would think the Aggr() might be the easiest way.
