Forum Discussion

Peckle's avatar
Peckle
Regular Visitor
8 years ago

Most Frequently Occurring Text / Aggregating String Values

Hi All, 

 

I'm having trouble finding out how I can portray the mode of a text/string value using DAX.

 

Below is a snippet of my data.

 

I want to be able to show the Audit result by Division based on the frequency of the result, 

 

E.g.

 

FP Division = A

P Division = A

G Division = A

 

 

 

Any help on this!

 

Thanks

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Peckle,

     

    Just trying to understand your question. Do you need to see how many times a Division received A or AA in Audit?

    • Zubair_Muhammad's avatar
      Zubair_Muhammad
      Community Champion

      Peckle

       

      Seeminlgy you need the most recurring audit for each division

       

      Try this MEASURE

       

      Measure =
      VAR MaxCount =
          MAXX ( VALUES ( Table1[Audit] ), CALCULATE ( COUNT ( Table1[Audit] ) ) )
      RETURN
          CONCATENATEX (
              FILTER (
                  VALUES ( Table1[Audit] ),
                  CALCULATE ( COUNT ( Table1[Audit] ) ) = MaxCount
              ),
              [Audit],
              ", "
          )
      
      • Peckle's avatar
        Peckle
        Regular Visitor

        Zubair_Muhammad

         

        That's right. I want to display the most recurring audit for each division

         

        Thanks I'll try this!