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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
BobKoenen
Helper IV
Helper IV

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 @BobKoenen 

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 @BobKoenen 

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.