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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

How to sum up all the number in a table string

hello all,

 

I would like to ask is there any way to sum up numbers in a table string and add them into a new column.

Bruh_0-1724645807686.png

I have this table here and inside there are three column I would like to sum up the numbers from: Usage(MB), Usage(MB)_1, Usage(MB)_2. I have been struggling because I dont know if there is a way to do it in power query

1 ACCEPTED SOLUTION

Make sure you're entering the correct columns. Power Query is case-sensitive:

danextian_0-1724655999598.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

3 REPLIES 3
danextian
Super User
Super User

Hi @Anonymous 

Try this:

List.Sum([Table Column][Column A]) + List.Sum([Table Column][Column B])

 

[Table Column][Column A] will access a column within a table as a list. List.Sum will sum all the values in that column and will work only if the content of the column accessed are indeed numbers. If they are not numbers, the contents need to be converted to numbers first before the sum operation.

List.Sum( List.Transform( [Table Column][Column A], each try Number.From(_) otherwise null ) )

The code above tries to convert each element in the list to a number and if the conversion errors out returns null.

If a column in the table contains only one row, you can access its content with:

[Table Column][Column A]{0}
--Column A as a list then the first element of that list which is index 0

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

Thank you for replying me, I followed your approach and keep getting "Expression.SyntaxError: Invalid identifier" on . Did I do sth wrong?

[Table Column][Column A]
               ^^^^^^^^

 

Make sure you're entering the correct columns. Power Query is case-sensitive:

danextian_0-1724655999598.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.