cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lornafnb
Helper I
Helper I

Create relationship between 2 queries and identify nulls

hi all,

 

I have 2 data sets - my "main" data set called Friends :

 

FriendsSurname
JohnWhite
JoeBlack
MarySimmonds

 

and the second one is Friends Birthdays: (note their is an intentional spelling mistake in Jeo's name :)-

 

FriendsBirthday
John01-Feb-22
Jeo05-May-22
Mary12-Dec-22

 

In my model I have created a relationship between these two sets, based  on field "Friends". I would like to identify the fields that link up AND those who dont. So I'm thinking of creating a column in my Main table ("Friends") that 

1) contains the value of Birthday if there is a sucessful join AND

2) a string "No Corresponding record found" if the join returns a null.

 

1). Is there a simple way to do this other than creating a calculated/custom column?

2) otherwise - the code to populate a new calculated/custom for this operation.

 

Maybe I could Merge the 2 tables and somehow identify the columns? I'd need some assistance to do that.

 

Thanks

 

Much appreciated.

1 ACCEPTED SOLUTION
ddpl
Resolver II
Resolver II

Hi,

 

If you dont want to create calculated or custom column then you can replace null value with "No Corresponding record found" after merging the table.

View solution in original post

2 REPLIES 2
Vijay_A_Verma
Community Champion
Community Champion

Use this code in a custom column

= try #"Friends Birthdays"{[Friends=[Friends]]}[Birthday] otherwise "No Corresponding record found"

 

ddpl
Resolver II
Resolver II

Hi,

 

If you dont want to create calculated or custom column then you can replace null value with "No Corresponding record found" after merging the table.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors