Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
2 years ago
Solved

Get Maximum Value Text

Hello Comrades

I need to get the Most Repeated Value Text for a certain value in a column, I have these people who appear repeatedly and within each value I want to know which one appears the most. For example, in the extra column, for everything that is equal to "KEYFT&T" I will see "Sandoval" Since it is the one with the highest count

Best regards

  • Anonymous's avatar
    Anonymous
    2 years ago

    Thank you Greg_Deckler and arava 

    Hi, Syndicate_Admin 

    Based on your description, I've used the following sample data:

    I created a measure using the following DAX expression:

    Max_Conteo_name = 
    VAR _KEYFT = SELECTEDVALUE('Table'[KEYF&T&T])
    VAR _Conteo = MAXX(FILTER(ALL('Table'),'Table'[KEYF&T&T]=_KEYFT),'Table'[Conteo])
    RETURN 
    MAXX(FILTER('Table','Table'[Conteo]=_Conteo&&'Table'[KEYF&T&T]=_KEYFT),'Table'[SUP])

    Put the KEYF&T&T and this metric into the table visual, and you can see that for each different KEYF&T the corresponding SUP with the largest Conteo is returned.

     

     

    Best Regards

    Jianpeng Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

4 Replies

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Administrator

      Not as such, because what I want to return to me is a text, not so much what is the maximum but the name of the one that has the maximum value

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thank you Greg_Deckler and arava 

        Hi, Syndicate_Admin 

        Based on your description, I've used the following sample data:

        I created a measure using the following DAX expression:

        Max_Conteo_name = 
        VAR _KEYFT = SELECTEDVALUE('Table'[KEYF&T&T])
        VAR _Conteo = MAXX(FILTER(ALL('Table'),'Table'[KEYF&T&T]=_KEYFT),'Table'[Conteo])
        RETURN 
        MAXX(FILTER('Table','Table'[Conteo]=_Conteo&&'Table'[KEYF&T&T]=_KEYFT),'Table'[SUP])

        Put the KEYF&T&T and this metric into the table visual, and you can see that for each different KEYF&T the corresponding SUP with the largest Conteo is returned.

         

         

        Best Regards

        Jianpeng Li

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

         

  • arava's avatar
    arava
    Regular Visitor

    If you'd like to make a calculated column, you can use the below formula and set the filter value to 1. 

     

    myColumn = RANKX(myTable, CALCULATE(COUNTROWS(myTable), FILTER(myTable, EARLIER(myTable[myColumn]) = myTable[myColumn])))