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
SV_community
Frequent Visitor

Lookup+pathitem not returning any results

Hello

I am trying to do bring some lookup value column into a table.


So my order column has more than one order ID in one row.

 

Product ID

2

3

2

3,4

 

I have to juxtapose this product description using lookupvalue

 

Product ID  Description (using lookup)

2                             Pen

3                              Pencil

4                            Eraser

2                            pen

3,4                         Pencil, Eraser

 

 

The lookup table has product id and descriptions. 

This is what I have done so far. I replace the delimeter from "," to "|" to leverage the PATH and related functions.

 

This is what I have done so far

 

Phase_Desc = var loopcount=PATHLENGTH(Subcontract[Phase Code(s)])
var n = GENERATESERIES(1,loopcount)
var companyname=" "
VAR __loopTable1 = ADDCOLUMNS(n,"company_name",companyname+LOOKUPVALUE(Phase[Phase Name],Phase[JHP_CODE],PATHITEM(Subcontract[Phase Code(s)],n,TEXT)))
RETURN
CONCATENATEX(__loopTable1,",")
 
I return a column with only "," correctly matching the pathlength which gives me the impression that the loop works but the lookupvalue is not being stored correctly.
 
I know the lookup works when I try it another column by providing hard coded indexvalue.
 
Can anyone help. Is there a better way to do this lookup
1 REPLY 1
v-yingjl
Community Support
Community Support

Hi @SV_community ,

Based on your description, your expected output seems clear but combined with your measure, I found that there seems two tables in the measure formula, what did the tables look like and the relationship between them, which table you want to add a new [Description] column?

Could you please consider sharing some sample data or a dummy sample file for further discussion?

 

Best Regards,

Yingjie Li

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors