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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Medmanage101
Frequent Visitor

Sum Column Cells, Not Columns - Help

I want to sum up the columns across, NOT down.  What DAX writes this?

I need a new column called "Score".  My new column would read...0,0,2,2,3,3,0,0 etc. going down. Thank you for heping.

Sample data:

Medmanage101_0-1671124491309.png

 

 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Medmanage101 ,

 

Approve with @vicky_ ,

You can also use merge columns:

vjianbolimsft_0-1671519629468.png

Output:

vjianbolimsft_1-1671519660247.png

Here is the M code:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlDSUUKgWB1sIhCmEREiQGSMW4QYu8gToYoLYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [A = _t, B = _t, C = _t, D = _t, E = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"A", Int64.Type}, {"B", type text}, {"C", Int64.Type}, {"D", Int64.Type}, {"E", type text}}),
    #"Inserted Merged Column" = Table.AddColumn(#"Changed Type", "Merged", each Text.Combine({Text.From([A], "en-US"), Text.From([C], "en-US"), Text.From([D], "en-US")}, ""), type text),
    #"Renamed Columns" = Table.RenameColumns(#"Inserted Merged Column",{{"Merged", "Score"}})
in
    #"Renamed Columns"

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @Medmanage101 ,

 

Approve with @vicky_ ,

You can also use merge columns:

vjianbolimsft_0-1671519629468.png

Output:

vjianbolimsft_1-1671519660247.png

Here is the M code:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlDSUUKgWB1sIhCmEREiQGSMW4QYu8gToYoLYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [A = _t, B = _t, C = _t, D = _t, E = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"A", Int64.Type}, {"B", type text}, {"C", Int64.Type}, {"D", Int64.Type}, {"E", type text}}),
    #"Inserted Merged Column" = Table.AddColumn(#"Changed Type", "Merged", each Text.Combine({Text.From([A], "en-US"), Text.From([C], "en-US"), Text.From([D], "en-US")}, ""), type text),
    #"Renamed Columns" = Table.RenameColumns(#"Inserted Merged Column",{{"Merged", "Score"}})
in
    #"Renamed Columns"

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

vicky_
Super User
Super User

You can either do this with DAX or Power Query. 
For DAX, you can simply create a calculated column or measure that is something like: 

 

NewColumnName = [Never Used] + [Not Used] + ... + [Always Used]

 

Or you can go back into Power Query and select those 5 columns then Add Column > Standard > Add

vicky__0-1671141618397.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.