5 Replies Latest reply on Oct 10, 2018 2:07 PM by Juan Daza

# Max of Count Distinct per Date

Hi community,

I am trying to figure out the following problem.

I have a table that looks something like this.

 Month Value Apr A Apr A Apr B Apr C May D May D May A May A June C June A June B June D

and I want the result to look something like this:

In April "A" had the max distinct count

In May "D" and "A" had the max distinct count

Etc..

 Month Max Unique Count Apr 2 May 2 June 1

I have tried using a Fixed calculation but I can't seem to get the maximum value of a Count Distinct since the Count Distinct aggregates all the data.

Has anyone tackled a similar problem?

• ###### 1. Re: Max of Count Distinct per Date

Hi Juan,

Thanks,

Ritesh

• ###### 2. Re: Max of Count Distinct per Date

------>window_max(COUNT([Value]))

• ###### 3. Re: Max of Count Distinct per Date

Hi Juan,

Use this calculation:

{ FIXED [Month]:MAX(

{ FIXED [Month],[Value]:COUNT([Value])})}

• ###### 4. Re: Max of Count Distinct per Date

Try this,

MAX({FIXED [Month],[Value]:COUNT([Value])})

Mahfooj

1 of 1 people found this helpful
• ###### 5. Re: Max of Count Distinct per Date

This does the trick! Thanks!