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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Solved! Go to Solution.
Hi @Anonymous ,
When using VAR, RETURN is required to return the final value/formula you want. You can write your formula as below
Value =
VAR m =
CALCULATE ( SUM ( 'Table'[A] ), FILTER ( 'Table', 'Table'[B] = "0" ) )
RETURN
m
or simply
Value =
CALCULATE ( SUM ( 'Table'[A] ), FILTER ( 'Table', 'Table'[B] = "0" ) )
By the way in case you are not aware 0 is different from "0" as the latter (in double quotes) is a text string.
Hi @Anonymous ,
When using VAR, RETURN is required to return the final value/formula you want. You can write your formula as below
Value =
VAR m =
CALCULATE ( SUM ( 'Table'[A] ), FILTER ( 'Table', 'Table'[B] = "0" ) )
RETURN
m
or simply
Value =
CALCULATE ( SUM ( 'Table'[A] ), FILTER ( 'Table', 'Table'[B] = "0" ) )
By the way in case you are not aware 0 is different from "0" as the latter (in double quotes) is a text string.