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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Asina
Helper III
Helper III

Lookupvalue not working as intended on two tables with same items

Hi, 

I am trying to use Lookupvalue to get matching data from another table.

I have 2 tables with matching column items (almost), meaning Table1 has column named: Hovedstation might have few more items than Table2 named: Hovedstation. However, the idea is to check the table2 and see if columns named: Hovedstation has a matching name, then it should call the a value from the column named: Ev_Procent. 

However, I am only getting 1 value matching 1 item on both columns...while the rest of the values shows as blank, even though they match in the item name......

Asina_0-1663587752420.png

While the hovedstation has more names Table1:

Asina_1-1663587777042.png

Does anyone know why is it showing values only for OST and not the rest, although we have matching names in table 2 see: 

Table2:

Asina_2-1663587843764.png

 

1 ACCEPTED SOLUTION

Hi Greg, 

 

I found the solution, and it has nothing to do with MAXX(filter()) functions, I have also used those, and the result was similar. The problem lay in the table structure, which was formed in the DAX itself by using {x,
x,
x} 

Apparently Dax has some code problem when reading a table with space between the commas, as shown above...The sample has to be: {x,x,x} when making a column.

Thus the solution: Lookupvalue(X[value],X[item],X1[item]) works fine and it also works with more than one matching row. 

Regards

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@Asina LOOKUPVALUE tends to return BLANK if more than one matching row is found. MAXX(FILTER(...),...) tends to be a more reliable construct.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi Greg

 

I tried your solution, however it seems I am getting same result:

Asina_0-1663589977080.png

 

Hi Greg, 

 

I found the solution, and it has nothing to do with MAXX(filter()) functions, I have also used those, and the result was similar. The problem lay in the table structure, which was formed in the DAX itself by using {x,
x,
x} 

Apparently Dax has some code problem when reading a table with space between the commas, as shown above...The sample has to be: {x,x,x} when making a column.

Thus the solution: Lookupvalue(X[value],X[item],X1[item]) works fine and it also works with more than one matching row. 

Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.