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.
Hello.
I don’t understand this thing in Power BI Desktop. I have two measures with this definition:
Difference between total of two columns:
z_Columns_Difference := CALCULATE( SUM([Final Existences]) - SUM([Initial Existences]) )
Total of the previous measure regardless the month:
z_Total_All_Months:=
CALCULATE(
[z_Columns_Difference];
ALL(Calendario[Mes])
)
If I analyze in Excel from Visual Studio 2015, the result is correct:
If I browse the Analysis Services database from SSMS, the result is the same:
But if I create a new report in Power BI Desktop, connecting with the same analysis services, the result is the following (Connecting live):
There is the same result for both columns. What is happening? I have the last versión of Power BI Desktop:
And I have a compatibility leve 1200 in Analysis Services Tabular.
Thanks in advance.
Solved! Go to Solution.
Hi @lcerrapa,
You can try to use allselected to instead, it doesn't ignore the original filter.
Regards,
Xiaoxin Sheng
Hi @lcerrapa,
It seems like the all filter has been ignored,
Please check your relationship if it has been set to single. if this is a case, you can modify it to both.
In addition, you can also try to filter by table instead the column:
z_Total_All_Months:= CALCULATE( [z_Columns_Difference]; ALL(Calendario) )
Regards,
Xiaoxin Sheng
Hello.
This solution doesn't fix my problem, because there is another filter in the year (in the same calendar table). If I use 'All(Calendario)' it ignores this filter year.
Thanks for your answer.
Hi @lcerrapa,
You can try to use allselected to instead, it doesn't ignore the original filter.
Regards,
Xiaoxin Sheng
Hi @v-shex-msft
If I change the definition this way as you say:
z_Total_All_Months:=
CALCULATE(
[z_Columns_Difference];
ALLSELECTED(Calendario)
)
The result is right. Many thanks for your time.
Hi
I notice that i can recreate this result which does not apply the ALL to the month name if you have the month name sorted by another column.
For me, this is a bug as you would expect the ALL to clear the filter context for that month column regardless or sorting?
Regards,
Mike
Hello.
Thanks for your answer. In fact, the column of the month name is sorted by another column (monthcode).
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
75 | |
63 | |
51 | |
48 |
User | Count |
---|---|
211 | |
86 | |
64 | |
59 | |
56 |