Forum Discussion

BIRahul's avatar
BIRahul
Frequent Visitor
3 years ago

Dynamically Change Year Month Slicer

I want to change the default selection of Year Month Slicer Dynamically on basis of today's date.

If Today is 1st day of month : Slicer selection will be previous month else it would be current month.

Example : 

  • Today = 1st March 2023 then Slicer default selection = 2023-02
  • IF Today = 2nd march 2023 then Slicer default selection = 2023-03

     

2 Replies

  • BIRahul , As of now you have use a workaround. As per Linkedin updates this features will be available soon

     

    Create a new column and save on this month

     

    Month Type = Switch( True(),
    eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
    eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
    Format([Date],"MMM-YYYY")
    )

     

     

    Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA

    • BIRahul's avatar
      BIRahul
      Frequent Visitor

      Thanks for the quick response amitchandak . If i select This Month in Slicer and publish to service, it will be always This month. for 1st March 2023 also it will take March month data but march data will be coming on 2nd March 2023.
      Please advice.