Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello,
I'm trying to create a measure to calculate a value that is filtered to current year that I can use in a line chart to see results over a 52 week period.
This is not working:
Solved! Go to Solution.
@jdwalker5 , Try like
CURRENT_YEAR_CALCULATION =
VAR CUR_YR = MAXX(allselected('DATA'), 'DATA'[YEAR_NBR])
VAR CALC = CALCULATE(
DIVIDE('DATA'[NUMERATOR], 'DATA'[DENOMINATOR]),
'DATA'[YEAR_NBR] = CUR_YR
)
RETURN CALC
@jdwalker5 , Try like
CURRENT_YEAR_CALCULATION =
VAR CUR_YR = MAXX(allselected('DATA'), 'DATA'[YEAR_NBR])
VAR CALC = CALCULATE(
DIVIDE('DATA'[NUMERATOR], 'DATA'[DENOMINATOR]),
'DATA'[YEAR_NBR] = CUR_YR
)
RETURN CALC
That's the ticket! Thanks for you your help @amitchandak.
FYI, I was able to get it to work by creating a custom column using MAX('DATE'[YEAR]), but I prefer to use your solution.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
88 | |
86 | |
83 | |
65 | |
49 |
User | Count |
---|---|
127 | |
108 | |
88 | |
70 | |
66 |