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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Search one table to return value from corresponding column

Hello!

 

I have two data files "schedule_data" and "production_data"

 

schedule_data has both columns lot_number (example format 12345, 23456, 34567, etc) and batch_size (example format 1, 8800, 550, etc), while production_data only has lot_number.

 

The lot numbers in production_data are the same as the lot numbers in schedule_data but in a different order.

 

My goal is to create 2 table visualizations in my power bi dashboard. One with the columns from schedule_data: lot_number, batch_size and another with the columns from lot_number from production_data and batch size from schedule_data.

 

Is there a way to get the visualization to look up the batch_size from schedule_data and create a batch_size column for the lot numbers in production_data? Either in a table or in a visualization? I cant get them to match up correctly

 

Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I have built a simply data sample:

Eyelyn9_3-1638515086523.png

 

  • Method1—— You could build a relationship based on lot_number between these two tables:

Eyelyn9_4-1638515184679.png

 

 

  • Method2—— Use LOOKUPVALUE() if there is a unique batch_size of each lot_number:
Searched = LOOKUPVALUE(schedule_data[batch_size ],schedule_data[lot_number],'production_data'[lot_number])

Eyelyn9_1-1638514696051.png

Eyelyn9_0-1638514618555.png

 

 

Best Regards,
Eyelyn Qin
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 @Anonymous ,

 

I have built a simply data sample:

Eyelyn9_3-1638515086523.png

 

  • Method1—— You could build a relationship based on lot_number between these two tables:

Eyelyn9_4-1638515184679.png

 

 

  • Method2—— Use LOOKUPVALUE() if there is a unique batch_size of each lot_number:
Searched = LOOKUPVALUE(schedule_data[batch_size ],schedule_data[lot_number],'production_data'[lot_number])

Eyelyn9_1-1638514696051.png

Eyelyn9_0-1638514618555.png

 

 

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

amitchandak
Super User
Super User

@Anonymous , You can but that might not be accurate, It can be Min/Max or Average of Size in another table for same lot number, if there is more than one size for the same lot number

a new column in production_data 

 

batch_size = Maxx(filter(schedule_data , production_data[lot_number]   =schedule_data [lot_number] ), schedule_data [batch_size] ) 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors