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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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