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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
damtran
Regular Visitor

Sum of 50 columns in one table

Dear Power BI Experts,

I'm working on a table which requires to sum 50 columns in a Total column. Could you please help with any measure? I already add a new column but don't know what measure to use to sum such many like that? Thank you in advance.

 

Best regards,

Dam

1 ACCEPTED SOLUTION

Hi,

While it can be easily done in the Query Editor, ideally you should transform your data to show all weeks in a single column.  This transformed dataset will be amenable to further analysis.  You may transform the dataset by select all columns other than the week columns, right clicking and selecting "Unpviot Other columns".

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
damtran
Regular Visitor

Hi Ashish, 

Thanks for your revert. I'd like to do it in Power Query.

Here's data for example, I would like to have total from week 1 to week 52, the blue column is expected sum.

 

DistrictWeek 1Week 2Week 3Week 4Week 5Week 6Week 7Week 8Week 9Week 10Week 11Expected total
Tan Binh5310471171164573
Phu Nhuan871164545510469
Binh Thanh845510473711670
Hoc Mon497711647116779

Hi,

While it can be easily done in the Query Editor, ideally you should transform your data to show all weeks in a single column.  This transformed dataset will be amenable to further analysis.  You may transform the dataset by select all columns other than the week columns, right clicking and selecting "Unpviot Other columns".

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

Do you want to do this in the Query Editor or in DAX (as a calculated column formula)?  Do you want to ad the last 50 columns of the table?  Share some data and show the expected result. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.