Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi,
i have a trivial question but i dont can solve this issue .
So i have this Measure, a static string/text "2018", get the result and works fine. 😉
But now i want to replace the static stuff to dynamic measure "LastYear" and get this issue:
When i show both Measure "LastYear and ActualYear" in a card, table,.. then it show me the correct result "2018" & "2019"
I hope you can help me and thanks in advance
Kind regards,
Unknown
Solved! Go to Solution.
@Anonymous -
Try it with a variable instead of a measure.
Variables can be loaded with a value and that value can then be used.
Measures are evaluated at the point in which they are used. So in your measure, there is probably something else affecting it.
General variable usage:
Previous Year = var my_variable = max('Date'[Year]) return my_variable - 1
Cheers!
Nathan
Hi @Anonymous
It looks like you are using the simplified syntax for the filter parmeters in the CALCULATE where it is not allowed.
Instead of
CALCULATE(SUM( ...); Table1[Geschäftsjahr] = [LastYear])
try
CALCULATE( SUM( ...);
FILTER( ALL(Table1[Gefächstjahr]); Table1[Geschäftsjahr] = [LastYear]) )
@Anonymous -
Try it with a variable instead of a measure.
Variables can be loaded with a value and that value can then be used.
Measures are evaluated at the point in which they are used. So in your measure, there is probably something else affecting it.
General variable usage:
Previous Year = var my_variable = max('Date'[Year]) return my_variable - 1
Cheers!
Nathan
Hi @Anonymous
It looks like you are using the simplified syntax for the filter parmeters in the CALCULATE where it is not allowed.
Instead of
CALCULATE(SUM( ...); Table1[Geschäftsjahr] = [LastYear])
try
CALCULATE( SUM( ...);
FILTER( ALL(Table1[Gefächstjahr]); Table1[Geschäftsjahr] = [LastYear]) )