Rolling SUM as DAX measure

hobeee

New Member
Joined
Dec 21, 2010
Messages
5
I am trying to SUM my SALES_AMT for the last 12 months as a rolling amount IF there is an entry OR NOT equal to "" (blank).
I am not sure how to correctly write the filter. Below I give an example.

=CALCULATE(sum(FSales[SALES_AMT]), DATESBETWEEN(DateTable[DateKey],FIRSTDATE(PARALLELPERIOD(DateTable[DateKey],-11,month)),lastDATE(PARALLELPERIOD(DateTable[DateKey],0,month))))


I have the relationship between the FSales and Datetable as many (date) to one (date).
I want my powerpivottable to read :
2014 January1 or more period w/o sales
2014 February1 or more period w/o sales
2014 March1351.5
2014 April1258.4
2014May1234.6
2014June1324.3

<tbody>
</tbody>


FSales table :
1/1/201361.9
1/15/201310.1
1/29/201353.1
2/12/201335.6
2/26/201369.4
3/12/2013
3/26/201321.3
4/9/201387.9
4/23/201325.1
5/7/201355.0
5/21/201376.6
6/4/201334.5
6/18/201310.1
7/2/201371.8
7/16/201386.9
7/30/201338.4
8/13/201363.9
8/27/201362.3
9/10/201338.2
9/24/201380.4
10/8/201355.6
10/22/201328.5
11/5/201347.2
11/19/201364.3
12/3/201350.3
12/17/201310.1
12/31/201360.2
1/14/201448.2
1/28/201450.2
2/11/201422.2
2/25/201478.5
3/11/201410.8
3/25/201494.6
4/8/20141.9
4/22/201418.1
5/6/201449.2
5/20/201458.5
6/3/201445.5
6/17/201478.7

<tbody>
</tbody>
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,214,918
Messages
6,122,243
Members
449,075
Latest member
staticfluids

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