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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Tob_P
Helper V
Helper V

Non Matching values from another table

TobPDELETE.png

This is my relationship between 2 tables, linked by an ID. The Opportunity table will hold all of the ID values from the Bidding Con table, but also hold a large number of ID values that are not on the Bidding Con table and I want to create a calculated column that will display as either true/false or a 0/1 or 'Has ID'/'Does Not Have ID', those values NOT in the Bidding Con table.

 

I have tried LOOKUPVALUE but that returns an error...

 

TobPDELETE1.png

I have tried to merge the tables but then that will only return those records/values that match and I have also tried a variety of RELATED solutions such as =IF(ISBLANK(RELATED(...but this will not work I believe due to the nature of the relationship between the two tables.

 

Can anyone recommend a potential solution please?

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Tob_P ,

Please follow these steps:

You are using LOOKUPVALUE to return an incorrect value because an Opportunity (tober_opportunityid) in the Bidding Con table may have more than one corresponding value, and the result of the Calculation Column will only show one value, so the Calculation Column doesn't know which value to get at this time. So you can refer to the following solution:

Based on your description, I created two tables and the relationship between them as follows.

 

vkaiyuemsft_0-1705557758935.png

vkaiyuemsft_1-1705557758935.png

vkaiyuemsft_2-1705557803821.png

1.Create a calculated column in the Opportunity table and write the following formula.

Column =

var _select=

SELECTCOLUMNS(FILTER(ALL('Bidding Con'),'Bidding Con'[Opportunity(tober_opportunityid)]=EARLIER('Opportunity'[opportunrityid])),"column",[Value])

return

IF(

    'Opportunity'[Value] in _select,1,0)

2.The result obtained is shown below.

vkaiyuemsft_3-1705557803822.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Tob_P ,

Please follow these steps:

You are using LOOKUPVALUE to return an incorrect value because an Opportunity (tober_opportunityid) in the Bidding Con table may have more than one corresponding value, and the result of the Calculation Column will only show one value, so the Calculation Column doesn't know which value to get at this time. So you can refer to the following solution:

Based on your description, I created two tables and the relationship between them as follows.

 

vkaiyuemsft_0-1705557758935.png

vkaiyuemsft_1-1705557758935.png

vkaiyuemsft_2-1705557803821.png

1.Create a calculated column in the Opportunity table and write the following formula.

Column =

var _select=

SELECTCOLUMNS(FILTER(ALL('Bidding Con'),'Bidding Con'[Opportunity(tober_opportunityid)]=EARLIER('Opportunity'[opportunrityid])),"column",[Value])

return

IF(

    'Opportunity'[Value] in _select,1,0)

2.The result obtained is shown below.

vkaiyuemsft_3-1705557803822.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

 

@Anonymous 

 

Thank you for this - worked perfectly for me.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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