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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
S44MSM
New Member

Dax Formula For Sum Rows

Hi I'm new to Power Bi so this probably is a really simple question

 

All i am trying to do is add a sub total column to add up the vales for each day

 

 06 April 202007 April 202008 April 202009 April 2020Total
Day Rate7159017492179181738670258
Plant760173917391739129775
Fuel390038503950385015550
Materials9888840498888569

36749

Sub Con27900273693129427741

114303

Total????

?

 
 
4 REPLIES 4
harshnathani
Community Champion
Community Champion

Hi @S44MSM ,

 

Assuming that your table looks like this.

 

1.jpg

 

 

Convert the attribute column to Date/Time.

 

 

2.JPG

 

Pull the matrix visualization, to get the desired output.

 

Regards,

Harsh Nathani

 

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

 

Hi @S44MSM ,

 

Did the solution work for you.

 

Please mark as solution for other community members to benefit.

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

Greg_Deckler
Super User
Super User

If your source data is actually formatted like that, unpivot all of your day columns so that you end up with 2 columns. Then you can use a matrix visualization and not do any work what-so-ever.

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I have used the matrix visulisation tool, to pull the data to make this table

 

My data isnt set out in this table, the tabel is a result of the matrix

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors