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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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

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

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

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
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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.