Forum Discussion
Anonymous
5 years agoNot applicable
DAX Issue.
Hi Experts, When I'm trying to create a measure I stuck up with below issue. Basicaly here I'm trying to display previous year values. I can use datediff but my column RPT Year is in Whole numb...
Anonymous
5 years agoNot applicable
Hi Anonymous ,
According to your description, I created the data:
Here are the steps you can follow:
1. Use the calculated table to create a calendar table named query2, and create a calculated column to display the yearcalculated table:
Quert2 = CALENDARAUTO()calculated column:
PRTyear = YEAR('Quert2'[Date])2. Create measure.
Test =
var _select =SELECTEDVALUE('Quert2'[PRTyear])
return CALCULATE(SUM('Query'[Jan]),FILTER('Query',YEAR('Query'[Date])=_select-1))3. Result
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.