cancel
Showing results for
Did you mean:

# Re: Running total

Regular Visitor
6963 Views
Senior Member

## Running total

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

Senior Member

## Re: Running total

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

Member

## Re: Running total

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

Regular Visitor

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

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

Highlighted
Regular Visitor

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

## Re: Running total

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