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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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