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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Topgunz786123
Regular Visitor

Is Not Blank and Is Blank

Hi All,

 

I have a data set which has Account Names, Parent of Account Names, Grandparent of Account Names, and Great Grandparent of Account Names.

 

What I'm trying to do is create a Custom Column which will show me the following:

IF Great Grandparent Name IS NOT blank, then give me Great Grandparent Name or

IF Great Grandparent Name IS blank and Grandparent Name IS NOT blank, then give me Grandparent Name or

IF Great Grandparent Name IS blank, Grandparent Name IS blank and Parent Name IS NOT blank, then give me Parent Name or

IF Great Grandparent Name IS blank, Grandparent Name IS blank, Parent Name IS blank, then give me Account Name.

 

I started the column like this but need help completing it:

Column = if('Account Hierarchy'[Great Grandparent Name]<> BLANK(),'Account Hierarchy'[Great Grandparent Name])

 

 

Any advice would be sincerely appreciated. 

 

1 ACCEPTED SOLUTION
askelton
Resolver I
Resolver I

Column = 
if('Account Hierarchy'[Great Grandparent Name]<> BLANK(),
    'Account Hierarchy'[Great Grandparent Name], 
    if('Account Hierarchy'[Grandparent Name]<> BLANK(),
        'Account Hierarchy'[Grandparent Name],
        if('Account Hierarchy'[Parent Name]<> BLANK(),
            'Account Hierarchy'[Parent Name],'Account Hierarchy'[Account Name])))

View solution in original post

2 REPLIES 2
joglidden2
Post Patron
Post Patron

Note to self when I come back to rediscover this topic:
'field' <> BLANK()

evaluates in an expected manner, and 
NOT(ISBLANK('field'))
is a fail. 

askelton
Resolver I
Resolver I

Column = 
if('Account Hierarchy'[Great Grandparent Name]<> BLANK(),
    'Account Hierarchy'[Great Grandparent Name], 
    if('Account Hierarchy'[Grandparent Name]<> BLANK(),
        'Account Hierarchy'[Grandparent Name],
        if('Account Hierarchy'[Parent Name]<> BLANK(),
            'Account Hierarchy'[Parent Name],'Account Hierarchy'[Account Name])))

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.