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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Relationship or LEFT JOIN, populate field from table if result is null or blank

Hi

 

Not sure how best to ask this question but here goes.  

 

I am trying to populate a field on my visual with a value from 'PersonName' column if the field or column 'CorrectName' is blank.  This happens because the table 'ProjectsCombined' does not have all the "ID_no's" so rather than have a blank field I wanted to fallback to table 'ProjectsDetails' and select the field called 'PersonName' instead.  How does one go about this, and shoudl I be looking at creating this as a measure or do I need consider a calculated column on the 'ProjectsDetails' table;  whcih will test the relationship between the two tables and if  blank fallback to default or main table 'ProjectsDetails' column 'PersonName'.  Below are a couple of drawings to illustrate what i am trying to do, the text in red is to show I want to use the PersonName value instead.  I should also say that the column 'PersonName' will be removed from the visual, for now it was helping me to identify which row(s) are empty or blank.

 

I am doing this in PowerBI DeskTop.

RelationShip 1-ManyRelationShip 1-ManyMy VisualMy Visual 

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try to use NATURALINNERJOIN() function create a calculated table and then create a calculated column.

 

Table = NATURALINNERJOIN(ProjectsDetails,ALLEXCEPT(ProjectsCombined,ProjectsCombined[ID]))

Column = IF(ISBLANK('Table'[CorrectName]),'Table'[PersonName],'Table'[CorrectName])

 

2.PNG 

 

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try to use NATURALINNERJOIN() function create a calculated table and then create a calculated column.

 

Table = NATURALINNERJOIN(ProjectsDetails,ALLEXCEPT(ProjectsCombined,ProjectsCombined[ID]))

Column = IF(ISBLANK('Table'[CorrectName]),'Table'[PersonName],'Table'[CorrectName])

 

2.PNG 

 

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Anonymous
Not applicable

Jay

 

Thanks, thats works nicely for me.

 

Chris

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.