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

Help with nested categories

Hi, I have a nested list where I need to, using Power Query, get a list of only the last value in the column. If the BOM is not a material i.e the field IsMaterial is not 1 then it should take the value of the last column. I'm only interested in having a list of values, the hierarchy does not need to be retained and can be writen over. 
Something like if [BOM1.IsMaterial]=1 then [BOM1.Value] else if [BOM2.IsMaterial]=1 then [BOM2.Value] else....
Not sure how to get the table formated correctly as in my second example.

 

Hannisky_0-1697637361988.png

 

1 REPLY 1
wdx223_Daniel
Super User
Super User

NewStep=#table({"No","Value","IsMaterial"},Table.ToList(PreviousStepName,each List.Skip(List.Split(List.Skip(_),3),each _{2}=0){0}?))

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