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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Kudoed Authors