Using selectedvalue to determine previous year and pass to variable
Hi, below measure is essentially trying to determine the sales for the year before the one the user has selected.
i am using VAR selected_assessmentYear to determine the year that the user has selected in the slicer and then subtracting 1 to determine the previous year.
When i test VAR selected_assessmentYearin a separate measure, it works fine and successfully shows the previous year. However when i pass it to the Finance_Sales[AcademicYear] section it doesn't seem to work and reverts to the year they user has selected instead.
Order Value (Previous AY) = VARselected_assessmentYear = SELECTEDVALUE( Finance_Sales[AcademicYear].[Year],0)-1 RETURN CALCULATE( SUM(Finance_Sales[NetValueBasedOnCommitment]), YEAR( Finance_Sales[AcademicYear] = selected_assessmentYear))