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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Dax help - to Calculate sum of Each Columns (I have 90 columns to be calculated)

I am fairly new to powerbi. I have the data with many columns. I need to get the sum of each columns as a table using dax.

I ll show a sample table here. (Original table has 90 columns like this and 500 rows)

 

OG1OG2OG3OG4OG5OG6
118.54 1,513.64396.00  
79.381,190.65393.6017.43 486.02
1,135.72486.0269.42525.0079.38856.97
189.45856.97 1,190.651,135.72105.23
396.00105.23 486.02  

 

I need the output like this:

 

AttributeSum
OG11919.09
OG22638.87
OG42615.1
OG31976.66
OG51215.1
OG61448.22

 Any help to write the dax measure for this would be great. 

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@Anonymous I would highly recommend unpivoting your columns in Power Query so that you end up with:

Attribute  Value

OG1         118.54

OG1         79.38

OG1         1,135.72

OG1         189.45

OG1         396.00

OG2         1,190.65

...

 

Then the problem can be solved with a by putting Attribute in a table visualization and a simple SUM of Value.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.