Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

add column with value based on filter

I have two tables OrderID  Date 1 13-okt 2 14-okt   OrderID  OrderLine  Product  Price 1 1 A 5 1 2 B 4 2 1 A 5 2 2 B 4 2 3 C 2   I want to a...
  • manikumar34's avatar
    5 years ago

    Anonymous , 

     

    Use something like this with relatioship.

     

    Column = CALCULATE(DISTINCT('Table (4)'[Product ]),FILTER('Table (4)','Table (4)'[Price]=MAX('Table (4)'[Price])))
     
    You can use the above DAX on both Calculated column or Measure. 
     
    Regards, 
    Manikumar
     
    If you think tjis is helpful, please Accept as Solution and leave a like.