cancel
Showing results for 
Search instead for 
Did you mean: 
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
Super User IV
Super User IV

Re: Running SUM formula in DAX

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)
	)
)

---------------------------------------

Not the Power BI thought police...

I have NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Highlighted
Pmoto
New Member

Re: Running SUM formula in DAX

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

zoloturu Memorable Member
Memorable Member

Re: Running SUM formula in DAX

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
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors