Forum Discussion
Anonymous
6 years agoNot applicable
Generate parent id from BOM level information
I am trying to figure out a DAX formula (or Power Query) to determine each rows parent if it exists. I have data which contains the index, level and component information. Parent column is the on...
- 6 years ago
Anonymous
Your DAX formula also seems correct.
JUST REPLACE FIRSTNONBLANK with LASTNONBLANK
Zubair_Muhammad
Community Champion
6 years agoAnonymous
As a Power Query Custom Column, try this
=try let myindex=[Index], mylevel=[Level] in Table.Max(Table.SelectRows(#"Changed Type",each [Index]< myindex and [Level]=mylevel-1),"Index")[Index] otherwise null
richardnlove918
2 years agoFrequent Visitor
Great input, thank you! How can I use this approach on a dataset which only has parent and child keys but no level column?