Forum Discussion
yuhkao
Microsoft Employee
6 years agoRolling 3 month
Hi I would like to have rolling data for calculation of [measure] for 3 months. please help me to create it. thanks date format is in YYYYMM format, which is text in data type now. for ...
MFelix
Super User
6 years agoHi yuhkao ,
This code is a calculated column in DAX in order to have a date column to use on the rolling 3 months.
Month_End_DAX = EOMONTH(DATE(LEFT('Table'[Date];4);RIGHT('Table'[Date];2);1);0)
yuhkao
Microsoft Employee
6 years ago
Hi MFelix - as i used your method to generate rolling 3 month data. i place into table visual with time frame, why it only shows last 3 month rolling as total? for previous couples months, it only shows month data instead of rolling data.
- MFelix6 years ago
Super User
Hi yuhkao .
WIth the small amount of data you gave me it work correctly I did not had any issue. I just realize adding more data that I made an error on the filter the measure must be:
Rolling 3 month = CALCULATE(SUM('Table'[Data]);DATESINPERIOD('Table'[Month_End_DAX];MAX('Table'[Month_End_DAX]);-3;MONTH))Sorry for misleading you.