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

    Max of Count Distinct per Date

    Juan Daza

      Hi community,

       

      I am trying to figure out the following problem.

       

      I have a table that looks something like this.

       

       

      MonthValue
      AprA
      AprA
      AprB
      AprC
      MayD
      MayD
      MayA
      MayA
      JuneC
      JuneA
      JuneB
      JuneD

       

      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..

       

       

      MonthMax Unique Count
      Apr2
      May2
      June1

       

      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?

       

      Thanks in advance!