Rolling 90 Day Total

Capt.Ragnar

Board Regular
Joined
Jun 6, 2012
Messages
138
I've tried to apply examples that I found here and elsewhere to no avail. Below is the DAX formula I've attempted without success...

90DaysAmount:=CALCULATE(SUMX(Table1,[Amount]),FILTER(ALL(Table1),Table1[Time ID]>=MAX(Table1[Time ID])-3&&Table1[Time ID]<=MAX(Table1[Time ID])))

What you need to know about the time component is that data is only reported monthly. So each number value in the Time ID table is reflective of a month and a year.

Ex.

[TABLE="width: 200"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Month[/TD]
[TD]Year[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Jan[/TD]
[TD]2013[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Feb[/TD]
[TD]2013[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Mach[/TD]
[TD]2013[/TD]
[/TR]
</tbody>[/TABLE]


I'm trying to calculate the 90 day volume for each location in my pivot. The formula above results in the same total for every location.
 
I think you're right. I'm trying to effectively create base units and filter them in the same code to reduce creating additional columns in my dataset. It never occured to me to create the calc without using a Calculated Column.

I see were you are headed. Let me see if I can get it to work.

I really need to take a class on this stuff. New to it only a couple of months ago...
 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,224,012
Messages
6,175,931
Members
452,686
Latest member
midhunjoseph

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