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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
pasele
Frequent Visitor

Nested if blank statement

COSTCENTER_fix = 

IF(
    ISBLANK('sapdata SAP_generalaccounting'[COSTCENTER]),
    IF(
        ISBLANK('sapdata SAP_generalaccounting'[WBS_ELEMT]),
        'sapdata SAP_generalaccounting'[PROFIT_CTR],
        LOOKUPVALUE('sapdata SAP_projektelement'[Ansvarigt_kostnstl], 'sapdata SAP_projektelement'[WBS_element], 'sapdata SAP_generalaccounting'[WBS_ELEMT])
    ),
    'sapdata SAP_generalaccounting'[COSTCENTER]
)

 

Here is my current code that is not working.

I want to check if column COSTCENTER is blank 
if it is blank use values from LOOKUPVALUE from WBS_ELEMNT
and if both are blank I want the values from PROFIT_CTR

problem is values from profit_ctr are not being entered, if both are blank this column is also blank. I cannot have blank rows in this column

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

may there are some non-true blank values in the column of WBS_ELEMNT

View solution in original post

3 REPLIES 3
wdx223_Daniel
Super User
Super User

may there are some non-true blank values in the column of WBS_ELEMNT

Ah yes you are correct, now that I checked it is just no text instead of (blank). What would be the best way to fix this? 

'sapdata SAP_generalaccounting'[WBS_ELEMT]=""

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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