Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

moving 12 month total - power pivot DAX

Posted on 2016-09-13
1
Medium Priority
?
49 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Viewers will learn how the fundamental information of how to create a table.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

715 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