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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I'm running some test to set my (pretty simple) measure but there is a thing that I dont understand.
When I use :
Version1 =
2 + CALCULATE(sum(FORECAST[Forecast]),filter(FORECAST,FORECAST[position]<=2))
My result is correct.
The constant 2 (used 2 times) is actually the result of another measure X. And I confirm that when I check the result of this measure, it is 2.
And when I use :
Version2 =
X + CALCULATE(sum(FORECAST[Forecast]),filter(FORECAST,FORECAST[position]<=X))
The result is not correct.
I'm sure that the first X is correctly interpreted as a 2, but not the 2nd one.
I don't understand this and i'm not able to find the logic used to find the same result than the machine.
Do you think the use of X inside Calculate + filter changes somehow the meaning of the calculation ?
Thank you for your help
Thanks for your answer, but actually I have completely changed my datamodel, and I.m not exposed to this problem anymore.... I guess I did something bad in my first datamodel.
Thank you guys for having tried to help.
Hi @Anonymous ,
If your metric is placed in a view with multiple fields, the results will be affected by rows, as in the following simple example.
x = CALCULATE(sum(FORECAST[Forecast]),filter(FORECAST,FORECAST[position]=2))
If you want the x measure to return the same result in all rows, add the ALL function.
x = CALCULATE(sum(FORECAST[Forecast]),filter(ALL(FORECAST),FORECAST[position]=2))
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , As a measure, is calculated at each row and grand total level. Your calculation will change based on that
You need to use some kind group
Version2 =
sumx(values(FORECAST[columns]), X + CALCULATE(sum(FORECAST[Forecast]),filter(FORECAST,FORECAST[position]<=X)))
change columns to with group by you want in visual
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.