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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Pmoto
New Member

Running SUM formula in DAX

Hello, 

 

I am new here and have a small amount of experince with Power BI. I have read a few threads about creating a formula in DAX for a running sum, but it is not working for me. From the screenshot below I need the "Measured Energy Inj/WD" to have a running sum for "Measurment Day (Display)." Another trick I need is to have it key of the "Meter Number' field and the "Facility" which is in another table that I have a relationship with in Power BI. Hopefully my this my logic makes sense. Let me know if I need to explain it a little better. Any help would be greatly appreciated!2018-09-14_8-57-16.jpg2018-09-14_9-01-16.jpg

3 REPLIES 3
Greg_Deckler
Super User
Super User

Can you post that text form that can be copied and pasted? 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

 

That being said, a running sum formula generally takes the form of:

 

Amount running total in Date = 
CALCULATE(
	SUM('Sample'[Amount]),
	FILTER(
		ALLSELECTED('Sample'[Date]),
		ISONORAFTER('Sample'[Date], MAX('Sample'[Date]), DESC)
	)
)

@ 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...

Hi Greg, I am not sure what you mean by "can you post that text form that can be copied and pasted?"

Hi @Pmoto,

 

It is not fully clear on which result do you want to achieve. Can you create a small prototype within Excel and paste it here as an image or text?

 

Regards,
Ruslan

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.