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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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