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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I'm trying to create a measure that adds "+2" to a sum (PRODUCTS[SALES]). But I only want to add the +2 to the values selected, e.g. I select product "Product 1" in the slicer, I add +2, but for all the other products the sales value remain the same. I have created a measure:
Solved! Go to Solution.
HI @hermanjb,
I'd like to suggest you create a variable to store the calculation result and write an if statement to check the variable that not equal to blank, then you can add '+2' on the match condition records.
Sales plus =
VAR result =
CALCULATE (
SUM ( Products[Sales] ),
ALLSELECTED ( Products ),
VALUES ( Products[ProductNames] )
)
RETURN
IF ( result <> BLANK () , result + 2 )
Regards,
Xiaoxin Sheng
HI @hermanjb,
I'd like to suggest you create a variable to store the calculation result and write an if statement to check the variable that not equal to blank, then you can add '+2' on the match condition records.
Sales plus =
VAR result =
CALCULATE (
SUM ( Products[Sales] ),
ALLSELECTED ( Products ),
VALUES ( Products[ProductNames] )
)
RETURN
IF ( result <> BLANK () , result + 2 )
Regards,
Xiaoxin Sheng
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!