Forum Discussion
Query_query
3 years agoRegular Visitor
Using power query in powerbi to transform an excel sheet data
Hi I am new to power bi power query editor. Can someone please help me with transforming the data in excel format (row 1-7) to the data readable format for powerbi? I have tried to use transp...
wdx223_Daniel
3 years agoCommunity Champion
import your data without header as Source
then input this code as Custom1
= let a=Table.ToColumns(Source),b=Table.ToRows(Source) in #table(List.FirstN(b{3},3)&{"Balance"}&List.FirstN(a{2},3),List.TransformMany(List.Skip(b,4),each List.Skip(List.Zip({_,a}),3),(x,y)=>List.FirstN(x,3)&{y{0}}&List.FirstN(y{1},3)))
Query_query
3 years agoRegular Visitor
Thanks, this works for a table format. How can I modify the code to work with a worksheet?