Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

moving 12 month total - power pivot DAX

Posted on 2016-09-13
1
Medium Priority
?
58 Views
Last Modified: 2016-09-24
I am trying to produce a table that will give me my moving 12 month total.

sales start from 01/01/2013 and end in 01/08/2016 - there are no sales in my model before or after these dates.

I want my table only to display a value where it is possible to have a full 12 months worth of aggregated data. I therefore want to exclude the data highlighted in red below from the table.

Can anyone amend the measure below  to do this?

Note: Ideally I want the table to update automatically so that the range of dates included automatically extends as time goes on. For example, at the end of september 2016 another 12 month total will be included.

CALCULATE([total sales],DATESINPERIOD(BasicCalendarEnglish[DateKey],LASTDATE(BasicCalendarEnglish[DateKey]),-12,MONTH))
moving 12 month total
Thanks
Mike
0
Comment
Question by:mikes6058
1 Comment
 
LVL 40

Accepted Solution

by:
lcohan earned 1500 total points
ID: 41796588
Please see details here as I believe they can help:

http://www.sqlbi.com/articles/rolling-12-months-average-in-dax/
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question