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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
SebSchoon1
Post Patron
Post Patron

Dynamic Table.GROUP with Dynamic List.Sum

Hello Guys,

 

New Challenge today

 

Table.Group(#"My Whole Table",#"List of columns not to aggregate",List.Sum(#"List of columns i want to aggregate") As Whole Number)

Is there a way to do this?

SebSchoon1_0-1653046133513.png

Data i would like not to aggregate.

 

SebSchoon1_1-1653046164266.png

Data i would like to aggregate

Dynamic sum of column 

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

View solution in original post

SebSchoon1
Post Patron
Post Patron

Hey Guys,

 

Here the answer !

 

I have found this on the internet and adapted to my Case

https://stackoverflow.com/questions/65342143/power-query-table-group-with-a-dynamic-list-of-aggregat...

 

This adapted to my situation is 

 

= Table.Group(#"Lignes triées", #"Lignes filtrées1", List.Transform(#"Detection des Tailles 11 On garde une liste", (C)=> {C, each List.Sum(Table.Column(_,C)), Int64.Type}))

in simple words

= Table.Buffer(Table.Group(#"Step in which i need this", #"List of columns i want to keep", List.Transform(#"List of columns i want to aggregate", (C)=> {C, each List.Sum(Table.Column(_,C)), Int64.Type})))

 

 

You're the gods guys!

View solution in original post

3 REPLIES 3
SebSchoon1
Post Patron
Post Patron

Hey Guys,

 

Here the answer !

 

I have found this on the internet and adapted to my Case

https://stackoverflow.com/questions/65342143/power-query-table-group-with-a-dynamic-list-of-aggregat...

 

This adapted to my situation is 

 

= Table.Group(#"Lignes triées", #"Lignes filtrées1", List.Transform(#"Detection des Tailles 11 On garde une liste", (C)=> {C, each List.Sum(Table.Column(_,C)), Int64.Type}))

in simple words

= Table.Buffer(Table.Group(#"Step in which i need this", #"List of columns i want to keep", List.Transform(#"List of columns i want to aggregate", (C)=> {C, each List.Sum(Table.Column(_,C)), Int64.Type})))

 

 

You're the gods guys!

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Hello, I just succeeded on Friday end of the work day. I'll post my solution and the source which has been used for! 

 

Thanks guys for your huge content!

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.