cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
fbron
Frequent Visitor

Creating a running total with values from a measure

I've created a measure to get to certain values, after that I want the outcome of this measure in a running total, can't get to a solution. Any suggestions?

 

This is what I'm working with:

Run Tot.png

4 REPLIES 4
Super User IV
Super User IV

Re: Creating a running total with values from a measure

With a date calendar try

Cumm  = CALCULATE(SUM([Weight (ad)]),filter(date,date[date] <=maxx(date,date[date])))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
In case it does not help, please provide additional information and mark me with @
My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP,
HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Super User! Linkedin


fbron
Frequent Visitor

Re: Creating a running total with values from a measure

Thank you for the quick response but the suggested measure doesn't seem to work.

Most likely due to the fact that Weight (add) is aready a measure by itself. Any suggestions on how to resolve this?

 

Cumm  = CALCULATE(SUM([Weight (ad)]),filter(date,date[date] <=maxx(date,date[date]))) 

Super User IV
Super User IV

Re: Creating a running total with values from a measure

Can you share sample data and sample output. 





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
In case it does not help, please provide additional information and mark me with @
My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP,
HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Super User! Linkedin


fbron
Frequent Visitor

Re: Creating a running total with values from a measure

@amitchandak Unfortunately it's not possible to share the dataset since I'm working directly with the data from our ERP database.


Perhaps some idditional info can be of help:

 

Table - Value_posts

Column: Article

Column: Quantity

Column: Adjustment (this is a checkbox within the ERP and translates to 0 or 1)

Column: Weight

Column: Posting date

Measure: Weight (add)

Weight (add) = -1*CALCULATE(SUM('Value_posts'[Weight]);'Value_posts'[adjustment]=0)

 

Table:Date

This is just a regular date table (incl hirarchy)

 

What I'm looking for is a matrix with a running total on the measure "weight (add)" per month / year.

 

Calendar year      JAN      FEB     MARCH    APRIL   ETC

2017

2018

2018

 

Both years and months come from the date table and the values presented should  come from the Weight add measure. Presented as a running total.

 

Hope this info can be of help.

 

Thanks in advance.

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