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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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 and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.