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

Looking for a value in a nested table and adding data to the nested table

Hi, 

I have a table here: 

automated_user_0-1665521018029.png

This Table has a column called "ID" with nested tables in it that takes the "PseudoNo" Column and seperates the string by the "," .  The "PseudoLines" column in the nested table in the above picture is where the seperated values go. So for Example 167 when broken up has 1 value "TSF24" and 2 Values of "TS12BLW". 


What I'm trying to figure out is how to get the "PartDescr" Column within the Nested table that matches the "PseudoLines" Value. For example for row 167's nested table:

automated_user_1-1665522260414.png

for each value in "PartNum" search for it in the "ID" nested table column and add if found in the "PseudoLines" column, add it's "Part Description" to the nested table. Is this possible in power query?

 

Thanks.

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

NewStep=let a=Table.Buffer(Table.Distinct(PreviousStepName,"PartNum")) in Table.TransformColumns(PreviousStepName,{"NestedTableColumn",each Table.AddColumn(_,"PartDescr",each a{[PartNum=[PseudoLines]]}?[PartDescr]?)})

View solution in original post

1 REPLY 1
wdx223_Daniel
Super User
Super User

NewStep=let a=Table.Buffer(Table.Distinct(PreviousStepName,"PartNum")) in Table.TransformColumns(PreviousStepName,{"NestedTableColumn",each Table.AddColumn(_,"PartDescr",each a{[PartNum=[PseudoLines]]}?[PartDescr]?)})

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.

Top Solution Authors
Top Kudoed Authors