Forum Discussion
Anonymous
4 years agoNot applicable
Identify Previous value based on two columns - column needed
Good MorningEverybody, I am hoping that you can assist with a calculation error I am having. I am attempting to create a new column which will show the Availability value from 12 months prior ...
Anonymous
4 years agoNot applicable
Hi,
Sorry but the year column can't be used. The only columns that would be there is what is the table seen in the reply Fleet, BU, Avail, and Date.
My apologies
MFelix
4 years agoSuper User
Hi Anonymous ,
You can remove the Year from the sintax.
PY Availability =
CALCULATE (
SELECTEDVALUE ( 'Availability'[Availability] ),
FILTER (
ALL ( 'Availability' ),
'Availability'[Date] = EARLIER ( DATEADD('Availability'[Date] ), -1 , YEAR))
&& 'Availability'[BU] = EARLIER ( 'Availability'[BU] )
&& 'Availability'[Fleet] = EARLIER ( 'Availability'[Fleet] )
)
)