Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I am learning variables in BI.
I want to create a measure that calculates revenue for all years(remove filter context on calendar). I came up with 2 ways to do it.
Method 1. Create a measure called Revenue,
Method 2.
Solved! Go to Solution.
Hi @Jack007 ,
Your second measure does not return the expected result because the revenue_calc value is calculated once, and never more. It is calculated when your variable is declared, when the calendar filter context is active. Your variable therefore stores revenues for the selected year. Then, in the "calculate()" part, this value is called directly and not recalculated, so the ALL() function doesn't change anything.
I am not sure my explanations are understandable 🙂 but you can find the idea in this article.
If I answered your question, please mark my post as a solution.
Best,
Hi @Jack007 ,
Your second measure does not return the expected result because the revenue_calc value is calculated once, and never more. It is calculated when your variable is declared, when the calendar filter context is active. Your variable therefore stores revenues for the selected year. Then, in the "calculate()" part, this value is called directly and not recalculated, so the ALL() function doesn't change anything.
I am not sure my explanations are understandable 🙂 but you can find the idea in this article.
If I answered your question, please mark my post as a solution.
Best,
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
70 | |
36 | |
21 | |
18 | |
15 |
User | Count |
---|---|
126 | |
32 | |
28 | |
24 | |
24 |