Forum Discussion
Rolling 12 YY-Month
- Anonymous4 years ago
Hi achanikya ,
If the last 12 months are always based on current date, you could simply use Relative Date filter as shown below:
2/11/2021-1/10/2022
Or if you want to dynamically change it based on date selection in slicer, please firstly create a date table for slicer, and then create a measure for filter:
ForSlicer = VALUES('Table'[Date])Measure = var _date= DATE(MAX('ForSlicer'[Date].[Year]), MAX('ForSlicer'[Date].[MonthNo]),1) var _diff= DATEDIFF(MAX('Table'[Date]),_date,MONTH) return IF(_diff>=0&& _diff<12,1,0)2021/2/1-2022/1/10
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi achanikya ,
If the last 12 months are always based on current date, you could simply use Relative Date filter as shown below:
2/11/2021-1/10/2022
Or if you want to dynamically change it based on date selection in slicer, please firstly create a date table for slicer, and then create a measure for filter:
ForSlicer = VALUES('Table'[Date])Measure =
var _date= DATE(MAX('ForSlicer'[Date].[Year]), MAX('ForSlicer'[Date].[MonthNo]),1)
var _diff= DATEDIFF(MAX('Table'[Date]),_date,MONTH)
return IF(_diff>=0&& _diff<12,1,0)
2021/2/1-2022/1/10
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.