Forum Discussion

ania_roh's avatar
ania_roh
Icon for Helper III rankHelper III
5 years ago
Solved

need help with dax formule

Hi, I´m trying to calculate the last value of every ID KPI (with a measure), as I showed it in the picture: I mean, the last  value is the value of the previos date, for every ID KPI, so I tr...
  • amitchandak's avatar
    5 years ago

    ania_roh , Create a new column like

    new column =
    var _max = maxx(filter(Table, [date]<earlier([Date]) && [ID KPI] =earlier([ID KPI])),[Date])
    return
    maxx(filter(Table, [date] =_max && [ID KPI] =earlier([ID KPI])),[value])