Forum Discussion

mabdelrahman76's avatar
4 years ago
Solved

Calculate max date value from date range

Hi, I have tracking table called "test", i am trying to to display only the most recent values for each group in column “CD_Trading_Id” regarding the value of the max Date modified. I have Date sl...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi mabdelrahman76 ,

     

    If you dont want to have constant value for Status , just remove the filter in measure, like:

    Measure = 
    var _max=CALCULATE(MAX('Table'[Modified]),FILTER(ALLSELECTED('Table'),[CD_Trading_Id]=MAX('Table'[CD_Trading_Id])))
    return IF(MAX('Table'[Modified])=_max,1,0)

    It will work, please try.

     

    Best Regards,
    Eyelyn Qin