Solved

moving 12 month total - power pivot DAX

Posted on 2016-09-13
1
31 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 500 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

830 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