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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Substract 2 measures when only when one is not blank, else return blank or 0

I have a matrix in which I have 2 measures and now I want to create a 3rd measure which gives me [measure1 - measure 2] only when measure 2 is not blank. If measure 2 is blank then measure 3 should also be blank.

 

Outcome

Department employeeMeasure 1Measure 2Measure 3
ITJohn10  
ITIlse2050-30
FinanceJack241014
FinanceJosie34304
FinanceJebaca65  
HRJay655015
HRJones50  

 

I have tried the measure below but is does not work unfortunatly. 

 

Measure 3 =
VAR BB = [Measure 1]
VAR VC = [measure 2]

RETURN
IF (
NOT ISBLANK ( BB ),
BB - VC,BLANK()
)

 

I hope you can help me

1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

Hi @Anonymous 

Measure 3 =
VAR BB = [Measure 1]
VAR VC = [measure 2]

RETURN
IF (
NOT ISBLANK ( VC ),
BB - VC,BLANK()
)

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

View solution in original post

1 REPLY 1
AlB
Community Champion
Community Champion

Hi @Anonymous 

Measure 3 =
VAR BB = [Measure 1]
VAR VC = [measure 2]

RETURN
IF (
NOT ISBLANK ( VC ),
BB - VC,BLANK()
)

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.