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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

lookup from another sheet with duplicates

Hi, i've got a bit stuck  in Power BI. I'm trying to use the lookup function. Upon trying i got the "a table of multiple values was supplied where a single value was expected". I guess that this is due to there beeing duplicate entries in my data (public records). anybody got a suggestion for a solution? 

 

 

So, what i'm trying to do is make Power bi look up a corresponding value to "lokalitetsnavn" in "column 16" in the second sheet, and then provide the matching information in "column 3" to the first sheet. This will tell me which farming company owns the specific license. 

The column lokalitetsnummer matches with "column 16" in the bottom sheet. However, not all numbers in column 16 is present in "lokalitetsnavn"

 

lookup 1.PNGlookup2.PNG

1 ACCEPTED SOLUTION

Hi,

 

In the Query Editor, you can change the data type to text.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

 

There are duplicate occurencues in column3.  There is no mistake in your formula.  Please show the exact result that you are expecting epecially in cases where there are duplicate occurences.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi Ashish, 

 

I tried the formula again today and got the following error.lookup 1.PNG

Which, I guess i relatively self explaining. The data in "column 3" is and needs to be text. Is there a workaround this? 

Both the corresponding values in "Column 16 and "Lokalitetsnummer" is numbers. Can transforming these values (which are uniqe id's identifying a particular site in both sheets) into text be a solutions? If so, how to do it?

 

Thank you, 

 

Hi @Anonymous,

 

Have you solved your problem after changing the type of Column 16 and "Lokalitetsnummer" to be text in Query Editor?

 

If you have solved your problem, please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, please share some data sample which could reproduce your scenario and your desired output so that we could help further on it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

In the Query Editor, you can change the data type to text.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
affan
Solution Sage
Solution Sage

Hi @Anonymous

 

This seems that you are trying to use LOOKUPVALUE function in measure. Instead you should insert a calculated column and then use it in your report.

 

If this helped you, please mark this post as an accepted solution and like to give KUDOS .

 

Regards,

Affan

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.