Forum Discussion

JMHenriques's avatar
JMHenriques
Frequent Visitor
4 years ago
Solved

Check previous text (status) in column

Hi everyone,   i have a historical table with the same ID from different weeks and want to check if the status column changed from one week to another.  I've sucefully added a rank column as well a...
  • amitchandak's avatar
    4 years ago

    JMHenriques , Try a new column like

     

    new column =
    var _max = maxx(filter(Table, [ID] = earlier([ID]) && [WeekDay] < earlier([WeekDay])),[WeekDay])
    return
    maxx(filter(Table, [ID] = earlier([ID]) && [WeekDay] =_max),[Hiring_Status_Real])

     

    If you want a measure then you should have seperate date/week table with rank and then try like

     

    Last Week = CALCULATE(MAx('Table'[Hiring_Status_Real]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))