Find more solutions in Power Query, Excel, Python, and ...... here www.linkedin.com/feed/update/urn:li:activity:7173075223699812352/?updateEntityUrn=urn%3Ali%3Afs_updateV2%3A%28urn%3Ali%3Aactivity%3A7173075223699812352%2CFEED_DETAIL%2CEMPTY%2CDEFAULT%2Cfalse%29
@daramawati22 күн бұрын
Thank you
@boissierepascal575525 күн бұрын
It seems so easy with your demo ! Thanks a lot.
@PowerMquery25 күн бұрын
Power Query is so sweet and easy to follow.
@Excelambda25 күн бұрын
Great video, Great smart challenge, like always, Great PQ solution.✌ - lambda alternative for any index hierarchy HPIV(h,v) Hierarchy Pivot where h: hierarchy indexes vector ; v: values vector =LAMBDA(h,v,LET(l,LEN(h),c,MAX(l),x,SORT(FILTER(h,l=c)),HSTACK(x,XLOOKUP(--LEFT(x,SEQUENCE(,c)),h,v))))
@PowerMquery25 күн бұрын
I am happy you like it and thanks for sharing your solution
@vida171925 күн бұрын
Great Solution! Below is my less advanced solution with Pivoted Columns, which I later filled down. To avoid hardcoded columns names {"Level 1", "Level 2", "Level 3"}, I extracted a list of all columns. let Source = Excel.CurrentWorkbook(){[Name="DataTable"]}[Content], #"Changed Type" = Table.TransformColumnTypes(Source,{{"Code", type text}}), #"Add Level" = Table.AddColumn(#"Changed Type", "Level", each "Level " & Text.From(Text.Length([Code]))), #"Pivoted Column" = Table.Pivot(#"Add Level", List.Distinct(#"Add Level"[Level]), "Level", "Description"), ColNames = List.Select(Table.ColumnNames(#"Pivoted Column"), each Text.Contains(_, "Level")), #"Filled Down" = Table.FillDown(#"Pivoted Column",ColNames), #"Filtered Rows" = Table.SelectRows(#"Filled Down", each (Text.Length([Code]) = 3)) in #"Filtered Rows"