'Power BI : Set the date range slicer with default to be MTD but it should also be able to allow us to change to different range dynamically

Currently i am working on problem where to set the date range slicer (between) which has to show the date range to be MTD but it should also be able to allow us to change to different range dynamically I have found one solution for it Which is in my date dimension table i created a calculated column

DT_Range_MTD = IF( FORMAT(dim_date[Date],"yyyymm")=FORMAT(TODAY(),"yyyymm") && dim_date[Date]<=TODAY(), 1, 0 )

its currently filtering the date to MTD , but unable to move back in the calendar . is there any way to implement this so i can keep the Date range slicer and have MTD as default but it can also allow us to change dynamically to any date range.

Any help will be great.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source