Running total

Senior Member
8035 Views
Highlighted
Senior Member
Posts: 251
Registered: ‎06-16-2017

Running total

[ Edited ]

NAME:

Running total performance measure

 

DESCRIPTION:

Calculate the running total of some column containing numerical values over any given period of time.

 

PARAMETERS:

Name: Base value

Tooltip: The value you want to measure the running total performance on.

Type: Numerical field / measure

 

Name: Dates

Tooltip: The dates interval wherein you want to calculate the running total.

Type: Date field

 

DAX:

Approach if you have a time dimension:

 

Running total of {Base value} =

Calculate(

 SUM({Base value}),

 FILTER(

  (ALL({Dates}),

  {Dates} <= MAX ( {Dates from time dimension} )

 )

)

 

Approach if you don't have a time dimension (this will only work if you have a row for each period of {Dates} in your date column):

 

Running total of {Base value} =

Calculate(

 SUM({Base value}),

 FILTER(

  (ALL({Dates}),

  {Dates} <= MAX ( {Dates} )

 )

)

 

 

If you take a look at the .pbix, you'll find syntax for creating a time dimension and making the monthname + year column.

 

Don't hesitate to ask about the measure. I'll gladly elaborate on anything regarding it.

Attachment
Senior Member
Posts: 251
Registered: ‎06-16-2017

Re: Running total

I've edited a little in the post. There were a typo in the DAX formulas.

Member
Posts: 135
Registered: ‎02-01-2016

Re: Running total

I'd really like to see this implemented.   I'd label this Lifetime To Date

Regular Visitor
Posts: 24
Registered: ‎04-12-2018

Re: Running total

Hi @ValubiMartin Is it possible to calculate running total for a measure instead of a physical column? Please let me know, thanks

Member
Posts: 65
Registered: ‎03-20-2018

Re: Running total

I have DataSet like Three Years(2016,2017,2018) and Want to show in line chart running total with X-axis as Month of every year and Y-axis having Price. When i implemented this dax for 2016,2017,2018 all are overlapping(having same value).

Regular Visitor
Posts: 24
Registered: ‎04-12-2018

Re: Running total

Hi @ravik4934,

 

Pls share the data, your current result and the expected results. If possible please share the pbix file as well.

 

Thanks

Member
Posts: 65
Registered: ‎03-20-2018

Re: Running total

Hi @ArulselvanD07 

 

Thanks I have figured it out where i was wrong. I just updated your DAX as per my requirements. Now its working fine.