Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

default slicer selection for Current month

Team,

 

I have a table which contains date from Jan 2020 to Dec 2020 and i have created a slicer as below,  selected may month date manually ... but i want to select always current month minus 2 months as a default selection ... is it possible to do? pls help.

 

 

 

  • Anonymous , Not possible to default slicer by function.

    You can create a column like this and have the values selected

    new column =

    Switch( True(),

    eomonth([Date],0) >= eomonth(Today(),-1),"Last to Last  Month" ,
    eomonth([Date],0) >= eomonth(Today(),-1),"Last Month" ,
    eomonth([Date],0) >= eomonth(Today(),0),"This Month" ,
    Format([Date],"MMM-YYYY")
    )

     

    new column =

    Switch( True(),

    eomonth([Date],0) >= eomonth(Today(),-1),"Data  Month" ,
    Format([Date],"MMM-YYYY")
    )

     

    and select last to last month or data month and save the slicer value

2 Replies

  • Anonymous , Not possible to default slicer by function.

    You can create a column like this and have the values selected

    new column =

    Switch( True(),

    eomonth([Date],0) >= eomonth(Today(),-1),"Last to Last  Month" ,
    eomonth([Date],0) >= eomonth(Today(),-1),"Last Month" ,
    eomonth([Date],0) >= eomonth(Today(),0),"This Month" ,
    Format([Date],"MMM-YYYY")
    )

     

    new column =

    Switch( True(),

    eomonth([Date],0) >= eomonth(Today(),-1),"Data  Month" ,
    Format([Date],"MMM-YYYY")
    )

     

    and select last to last month or data month and save the slicer value