Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
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
Solved! Go to Solution.
Make sure you're entering the correct columns. Power Query is case-sensitive:
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
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:
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
65 | |
63 | |
52 | |
37 | |
36 |
User | Count |
---|---|
82 | |
66 | |
61 | |
46 | |
45 |