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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors