Calculating running total between two random dates

RichardRayJH

New Member
Joined
Jan 18, 2013
Messages
24
Given

1) a Calendar table with continuous dates in a column [DateDate]
2) an interface that allows the user to select a [StartDate] and an [EndDate]
3) the [StartDate] and [EndDate] might not be in the same year
4) a measure of some sort, say [Net Revenue], that calculates just fine for each date

I want a DAX formula that gives me a running total of [Net Revenue] starting on [StartDate] through [EndDate].

Date Net Amount Running Total
------------ ------------ ---------------
12/29/2012 5000 5000
12/30/2012 6000 11000
12/31/2012 2500 13500
01/01/2013 1000 14500
01/02/2013 2000 16500

My usual ploy of just finding someone who's already done it and posted it in a blog or a book hasn't worked and I'm stumped with my own newbie skills, HELP.
 
what if...instead of having the dates that you want to analyze as a measure, you create a dax measure using CALCULATE TABLE or ADD COLUMNS to define the dates that you're trying to analyze? I've been playing around with your file but for some reason I've not reached the solution (without using the running total feature of pivot tables) because when we use MIN, MAX, FIRSTDATE, LASTDATE it's actually querying ALL the set of rows meaning the first date that you have there but not the first one that you want to start your calculation. And I haven't had a chance to really look at what's going on in those tables...Even using Laurent's code is not doing it.
 
Upvote 0

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,224,928
Messages
6,181,808
Members
453,067
Latest member
mdiz777

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top