Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Month (numeric) slicer default settings

Hi guys,

 

I have the data model with DimDate table inside and I would like to have a slicer on my report that range will start always from the January current year to month previous to current one (but there should be possible to select current as well as all the other months in the year - even if there is no data for them). So if there currently an April it should show the data from January to March by default. I need to use the numbers of months on the slicer and I have such column created in the Date table - so for Jan is 1, Feb is 2 etc. Below is the slicer and how it should look by default now. Any help is appreciated - I cannot find any suitable solution.

 

5 Replies

  • There are two ways i can think off to achive what you stated.

     

    1. in the table that contains your date colunm add a calculated colunm for If(table1[date] < NOW() ,TRUE,FALSE)

    you can then use this to filter the whole report and your slicer will shrink down to only the defaulted values

     

    2. i always use my own date table, rather than use to built in date tables i import my own and connect all relevent dates to this table. i have a colunm in this table for month which can be used and a colunm for date_Passed that does the same check above.

     

    i can upload a copy of my date table if you need it 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

     

    Create a column as below,

    Month Slicer = Orders[Month]<MONTH(TODAY()) which give syou boolean value T/F.
    and use this Month slicer as page/visual filter as per your usecase & set it to True.
    below is the result,
     
    let me know if this works for you!
     
    Regards
    Harsha Vardhan
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks, but that is not solving my issue as I need to have a slicer that will display all months on it and to display the data to current month as well.

      • parry2k's avatar
        parry2k
        Super User

        Anonymous in my original reply I mentioned it is not possible at this point. Check ideas forum and vote if this idea exists otherwise create new idea