Forum Discussion

AOT's avatar
AOT
Frequent Visitor
7 years ago
Solved

Select max value in column based on another column

I am looking to select the Max value in eip_value based on the key column. How do I write a Dax function to do this?

  •  

    You could write it like so:

     

    CALCULATE(MAX('Table'[eip_value]), ALLEXCEPT('Table', 'Table'[Key]))

    Please make sure to use that in the data view, as it is a DAX-function.

5 Replies

  • ImkeF's avatar
    ImkeF
    Community Champion

    Do you want it as a column or a measure?

    • AOT's avatar
      AOT
      Frequent Visitor

      Hi,

       

      I want it as a column, thanks

      • ImkeF's avatar
        ImkeF
        Community Champion
         

        You could write it like so:

         

        CALCULATE(MAX('Table'[eip_value]), ALLEXCEPT('Table', 'Table'[Key]))

        Please make sure to use that in the data view, as it is a DAX-function.