Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Find who has max value

Hi, everyone.

I'm new in Power BI, before it I worked with Tableau, that's why I need some help to solve the following task: I need find, who has the highest value in table.

 

For example, I have a table:

A 2000

B 500

C 3500

D 1000

 

I see, that C has highest value in this table (3500), but how can I calcuate it using DAX formula?

 

Thanks!

  • Anonymous , Try one of the two measures

     

    lastnonblankvalue(Table[column2], max(Table[Column1])

     

     

    measure =
    var _max = maxx(allselected(Table), Table[column2])
    return
    calculate(max(Table[Column1]), filter(Table, Table[Column2] =_max))

2 Replies

  • Anonymous , Try one of the two measures

     

    lastnonblankvalue(Table[column2], max(Table[Column1])

     

     

    measure =
    var _max = maxx(allselected(Table), Table[column2])
    return
    calculate(max(Table[Column1]), filter(Table, Table[Column2] =_max))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for answer!

       

      Is it possible to calculate, if this columns are in different tables?