Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
swarnalvr
Frequent Visitor

Dax measure

Hi 

I am using matrix table and there is sales1 and sales2, iam dynamically selecting those measures from drop down slicer

I have used "difference "= sales1-sales2 which runs when both are selected from drop down colums..

 

I want show difference to" blank"when sales2 not selected  in the table from the drop using measure

 

Used difference = if(isblank(sales2),blank(),sales1- sales2

But not getting blank value when there is no sales2 measure in the table

 

1 ACCEPTED SOLUTION

@swarnalvr ok, so try with:

Difference =
IF(
ISINSCOPE(Sales2),
Sales1 - Sales2,
BLANK()
)

 

BBF

View solution in original post

4 REPLIES 4
BeaBF
Super User
Super User

@swarnalvr Hi! try with:

Difference =
IF(
NOT ISBLANK(SELECTEDVALUE(Sales2)),
Sales1 - Sales2,
BLANK()
)

 

BBF

Thanks but both sales1 and sales 2 are measures..so selected value not working

@swarnalvr ok, so try with:

Difference =
IF(
ISINSCOPE(Sales2),
Sales1 - Sales2,
BLANK()
)

 

BBF

@swarnalvr if you can paste some sample data and the measures, i can help you better.

 

BBF

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors