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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Dax LOOKUPVALUE for duplicates values and different length values

Hi 

I need help to enhance my DAX commans below. Below the Dax lookup command works initally what i need but there was changes to the values. O

1)  of the changes was with duplicate values. When i run the dax lookupvalue command it gives an error of - A table of multiple values was supplied where a single value was expected

2) The second change was that the current Dax command was loking at the length which was all 7 in length. Now the part number could be 4 to 14 charters long.

 

All suggestion for both or 1 of the items is helpful

 

bu965_0-1643726476937.png

bu965_1-1643726506305.png

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try like

new column =

maxx(filter(Table2, Table1[Engineering Item Number] = Table1[CPARTN]), Table2[Primary Item Number ])

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi  @Anonymous ,

It seems that the table contains duplicate data causing the error to occur:

You can change the lookupvalue formula to the following form:

CALCULATE(FIRSTNONBLANK('PNDETAIL'[Primary Item Number], 1), FILTER(ALL(' PNDETAIL '),' PNDETAIL '[Enginneering item number]= 'CQMSPN'[CPARTN] ) )

 

Best Regards,

Liu Yang

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 , Try like

new column =

maxx(filter(Table2, Table1[Engineering Item Number] = Table1[CPARTN]), Table2[Primary Item Number ])

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amitchandak

I tried to use the syntx but got an error message .

new column = maxx(filter(CQMSPN, PNDETAIL[Engineering Item Number] = CQMSPN [CPARTN]), PNDETAIL [Primary Item Number ])

 

bu965_0-1645486191832.png

 

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.