Forum Discussion
Anonymous
7 years agoNot applicable
Creating a Rolling 12 months using Month Column
Hi Community, I have to create measure for calculating a rolling 12 months for Sales. I don't have date column but i have month colum(like 1,2,3 ..12) . How can i acheive it. Please help. ...
- Anonymous7 years agoI have created a calender table and created a column order using ranx function. below is the working DAX.12M Rolling YTD = IF (HASONEVALUE ( 'Calendar'[YearMonthNo] ),CALCULATE (SUM( 'NA Daily'[Total Sales] ),FILTER (ALL ( 'NA Daily'[Order] ),'NA Daily'[Order]>= SELECTEDVALUE ( 'Calendar'[Order_Calendar] ) - 11&&'NA Daily'[Order] <= SELECTEDVALUE ( 'Calendar'[Order_Calendar] ))),CALCULATE ( ( 'NA Daily'[Total Sales YTD] ) ))
Anonymous
7 years agoNot applicable
No
NickolajJessen
7 years agoSolution Sage
Then i don't think that's possible
- Anonymous7 years agoNot applicable
I have brought Year column and now i have concatenated Year and month column and created calculated column. Now i have the column like 201801.
How can i get the rolling 12 months.
- v-cherch-msft7 years agoMicrosoft Employee
Hi Anonymous
You may have a look at below posts. Sample data and expected output will be helpful to provide an accurate solution.
https://community.powerbi.com/t5/Desktop/Moving-Average-for-Prev-6-Next-6-Months/td-p/171712
https://community.powerbi.com/t5/Desktop/Averages-For-The-Last-12-Months/td-p/324289
https://www.sqlbi.com/articles/rolling-12-months-average-in-dax/
Regards,
Cherie
- Anonymous7 years agoNot applicable
It doesn't helps me out.