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.
Thanks,
Paruchuri
- 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] ) ))
9 Replies
- NickolajJessenSolution Sage
Do you also have a year column?
- AnonymousNot applicable
No
- NickolajJessenSolution Sage
Then i don't think that's possible