Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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,
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
13 | |
11 | |
10 | |
8 | |
6 |
User | Count |
---|---|
13 | |
12 | |
11 | |
9 | |
9 |