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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MohsinBipu
Helper I
Helper I

Group data/ alternative Row transfer into column

I want to re-organize the data as below. Every 2 rows will be transposed and all data need to convert into 02 columns. 

MohsinBipu_1-1677731339127.png

 

 

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

NewStep=#table(2,List.TransformMany(Table.Split(PreviousStepName,2),each Table.ToColumns(_),(x,y)=>y))

if you use the source as your another post, just use this code to get result in one step

=let fx=(t)=>let a=Text.Split(Text.From(t)??"","-") in List.Count(a)=3 and List.AllTrue(List.Transform(a,each _<>"" and Text.Remove(_,{"0".."9"})="")) in #table(2,List.Accumulate(Table.ToRows(PreviousStepName),{{},{}},(x,y)=>{x{0}&List.Select(List.Zip({x{1},y}),each fx(_{1})),y}){0})

View solution in original post

2 REPLIES 2
MohsinBipu
Helper I
Helper I

Both were Tried and this is also working. Thanks, Brother. You are a real super user. 

wdx223_Daniel
Super User
Super User

NewStep=#table(2,List.TransformMany(Table.Split(PreviousStepName,2),each Table.ToColumns(_),(x,y)=>y))

if you use the source as your another post, just use this code to get result in one step

=let fx=(t)=>let a=Text.Split(Text.From(t)??"","-") in List.Count(a)=3 and List.AllTrue(List.Transform(a,each _<>"" and Text.Remove(_,{"0".."9"})="")) in #table(2,List.Accumulate(Table.ToRows(PreviousStepName),{{},{}},(x,y)=>{x{0}&List.Select(List.Zip({x{1},y}),each fx(_{1})),y}){0})

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors