Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

How do i find maximum values from a column with respect to other column data

Migrating bobj report to power bi. In bobj I have a calculation as = Max(IF([Replicate = 1] Then ([Result])) In ([Batch ID])   Sample Data   Batch ID Result Value  Replicate 817 2.93 1...
  • Ritaf1983's avatar
    2 years ago

    Hi Anonymous 

    If you want a Dax solution, you can add a calculated column with the formula:

    max_by_id = CALCULATE(max('Table'[Result Value]), ALLEXCEPT('Table','Table'[Batch ID]))

    Pbix is attached 

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

  • Ritaf1983's avatar
    Ritaf1983
    2 years ago

    Hi Anonymous 

    If you want the values to change according to the slicers / filters selections you cant use calculated columns and need to create measures.

     

     

    The updated pbix is attached

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