Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

DAX to show Value changes

Hi,    I am working on window panels and they are going to be inspected for the forseeable future based on their Priority levels. I want to show in a calcualted column or measure, the window panels...
  • Greg_Deckler's avatar
    Greg_Deckler
    5 years ago

    Anonymous This worked for me with your data:

    Column = 
      VAR __Current = RIGHT([Priority],1) * 1
      VAR __PreviousDate = MAXX(FILTER('Table3','Table3'[Date of Inspection] < EARLIER('Table3'[Date of Inspection]) && [Panel No]=EARLIER('Table3'[Panel No])),[Date of Inspection])
      VAR __Previous = RIGHT(MAXX(FILTER('Table3',[Date of Inspection]=__PreviousDate),[Priority]),1) * 1
    RETURN
      IF(ISBLANK(__PreviousDate),0,__Current - __Previous) * -1