Forum Discussion
Refer to previous value within a Matrix
Hey guys,
last 2 columns is my issue. I need the "Backlog Line not put away prior day" Value to calculate my SLAs. All columns values are measures. "Backlog Line not put away prior day" uses Today()-1 which is fine but with how PBI works it does not show any value for prior day as each row is displayed for one specific Date. So what i am asking is there a way to transfer my "No Putaway" (which is the same as the Backlog) from a prior Date to the next Date? And if not do you have any other ideas on how to achive this kind of matrix.
- Hiyou can use the below, this should solve your problem.yesterday =VAR yd = MAX('calendar'[Date]) -1RETURNCALCULATE([measure],ALL('calendar'), 'calendar'[Date] = yd)
Anonymous you can simply use previousday function as mentioned previously
Prev Day = CALCULATE( [Measure], PreviousDay( Calendar[Date] ) )
7 Replies
- parry2kSuper User
Anonymous you can use previousday function to get the value from previous date. It is adviseable to add date dimension in your model if you already don't have one.
- MariuszCommunity ChampionHiyou can use the below, this should solve your problem.yesterday =VAR yd = MAX('calendar'[Date]) -1RETURNCALCULATE([measure],ALL('calendar'), 'calendar'[Date] = yd)
- AnonymousNot applicable
This is genious! Thx. Works great. I am new to PBI still got a lot to learn.
- parry2kSuper User
Anonymous you can simply use previousday function as mentioned previously
Prev Day = CALCULATE( [Measure], PreviousDay( Calendar[Date] ) )