cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Taurus Frequent Visitor
Frequent Visitor

Table.Group and complex aggregation function

For example, I have this simple SQL statement:

 

SELECT a, SUM(b)*a  FROM table  GROUP BY a

 

How can I implement "SUM(b)*a" in a Table.Group function? For "SUM(b)" Power Query generates "each List.Sum([b])", but how to multiply this by "a" ? Or how to implement SUM(b*a), which cause the same result?

1 ACCEPTED SOLUTION

Accepted Solutions
PhilC Regular Visitor
Regular Visitor

Re: Table.Group and complex aggregation function

Can you Group by [Column a], with a sum aggregation for [Column b], then add a custom column for [Column a] * [new column b]?

View solution in original post

1 REPLY 1
PhilC Regular Visitor
Regular Visitor

Re: Table.Group and complex aggregation function

Can you Group by [Column a], with a sum aggregation for [Column b], then add a custom column for [Column a] * [new column b]?

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Top Kudoed Authors
Users Online
Currently online: 298 members 2,978 guests
Please welcome our newest community members: