Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
Solved! Go to Solution.
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])))
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.
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])))