Forum Discussion
PEEVEE
3 years agoRegular Visitor
Unpivoting Multi Columns based on specific text contain in Header (Date)
Hi All, I have a table in excel which is under transformation in Power BI but due to more than 300 column i am facing challenge while unpivoting data manually selection it is taking too much time...
wdx223_Daniel
3 years agoCommunity Champion
NewStep=Table.Combine(Table.TransformRows(Table1,each let a=Record.ToTable(_) in Table.Combine(Table.Group(Table.Skip(a,2),"Name",{"n",each #table(List.FirstN(a[Name],2)&List.TransformMany({1..Table.RowCount(_)},each {"Attribute","Value"},(x,y)=>y&Text.From(x)),{List.FirstN(a[Value],2)&List.Combine(Table.ToRows(_))})},0,(x,y)=>Byte.From(Text.EndsWith(y,"Date")))[n]))
PEEVEE
3 years agoRegular Visitor
this code is not working in my current PBI Power Query, if you have created any sample data for my subjected problem, request you to please share PBIX sample file for my better understaning on code & its working.