cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SaaM
Helper II
Helper II

expand multiple columns at once

Hi

Is it possible to expand for all the columns Grouped_1 and Grouped_2 at once (example in picture)?

When trying to do it column by column it is too slow.

(In my final structure i will have 10 grouped columns from grouped_1 to grouped_10)

 

SaaM_0-1616605054854.png

 

As the picture won't show, my Table look like this:

 

ID        Grouped_1 Grouped_2
11020 [Table] [Table]
11020 [Table] [Table]
10013 [Table] [Table]
18375 [Table] [Table]
10066 [Table] [Table]
10075 [Table] [Table]
10159 [Table] [Table]
19944 [Table] [Table]
19944 [Table] [Table]

 

Thanks in advance

kind regards

Saam

1 ACCEPTED SOLUTION
Rocco_sprmnt21
Community Champion
Community Champion

potresti provare qualcosa del genere ...

 

listGrouped=List.Select(Table.ColumnNames(yourab), each ----),
namesColGroupX=[groupe_1={"c11", ---}, groupe_2={"c21", ---}, ...],
List.Accumulate(listGrouped, yourtab, (s,c)=>Table.ExpandTableColumn(s,c, Record.Filed(namesColGroupX,c)))

 

View solution in original post

1 REPLY 1
Rocco_sprmnt21
Community Champion
Community Champion

potresti provare qualcosa del genere ...

 

listGrouped=List.Select(Table.ColumnNames(yourab), each ----),
namesColGroupX=[groupe_1={"c11", ---}, groupe_2={"c21", ---}, ...],
List.Accumulate(listGrouped, yourtab, (s,c)=>Table.ExpandTableColumn(s,c, Record.Filed(namesColGroupX,c)))

 

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors