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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ruta
Frequent Visitor

LOOKUP

Hi all,

 

I have an issue with lookup with two not related tables. The idea is simple: one 'small' sheet contains a list with few invoice numbers that are exceptions and the other-'big' sheet - is a table with many invoice numbers. I need to check if an invoice number from the big sheet is also in the small sheet and if so I need the value to be equal to Y (as in yes exception) and N if the invoice is only in the big sheet.  How do I connect the two tables so this works?

 

Many thanks!!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Create a column in the big sheet and name it something like "Is Exception." Then type the formula:

 

Is Exception =
var __currentInvNum = BigTable[InvoiceNumber]
var __isException = 
	NOT ISEMPTY(
		FILTER(
			SmallTable[InvoiceNumber],
			SmallTable[InvoiceNumber] = __currentInvNum
		)
	)
return
	__isException

Please note the above is not a measure. It's a formula for your column in the big table. Now that you have this, you can hide the small table from view.

 

Best

Darek

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Create a column in the big sheet and name it something like "Is Exception." Then type the formula:

 

Is Exception =
var __currentInvNum = BigTable[InvoiceNumber]
var __isException = 
	NOT ISEMPTY(
		FILTER(
			SmallTable[InvoiceNumber],
			SmallTable[InvoiceNumber] = __currentInvNum
		)
	)
return
	__isException

Please note the above is not a measure. It's a formula for your column in the big table. Now that you have this, you can hide the small table from view.

 

Best

Darek

Thank you so much @Anonymous !! Would never have figured this out on my own.

all best,

ruta

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors