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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
EaglesTony
Helper V
Helper V

How do I get a grand total in PowerQuery M

Hi,

 

  I have this table

 

ID      TotalNumberofItems

1       5

2       2

3       4

 

What I need is a grand total, something like

 

ID    TotalNumberofItems    Grand Total

1      5                                   11

2      2                                   11

3      4                                   11

 

Or is there a way to have a "dummy" row at the end to total these, as such:

 

ID                           TotalNumberofItems  

1                             5                                   

2                             2                                   

3                             4   

DummyRow          11                                   

 

 

1 ACCEPTED SOLUTION
Syk
Super User
Super User

Duplicate your table > Highlight the column you want to get the grand total from > Transform > Statistics > Sum

Syk_0-1715713481332.png

Rename 'Table (2)' into something more useful like 'Grand_Total'

Go back to original table > Add Column > Custom Column > enter in whatever you just named the grand total

Syk_1-1715713581909.png

 

All done!

Syk_2-1715713614448.png

 

 

View solution in original post

2 REPLIES 2
Syk
Super User
Super User

Duplicate your table > Highlight the column you want to get the grand total from > Transform > Statistics > Sum

Syk_0-1715713481332.png

Rename 'Table (2)' into something more useful like 'Grand_Total'

Go back to original table > Add Column > Custom Column > enter in whatever you just named the grand total

Syk_1-1715713581909.png

 

All done!

Syk_2-1715713614448.png

 

 

Now thinking is there an easier way, my thinking is if I duplicate the table and it is pulling data when refreshing then it is refreshing 2 tables with the same data instead of 1 table..

 

Is Dax an option here ?

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

Top Solution Authors
Top Kudoed Authors