Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Set default limits for between date filter

Hello to you,

 

my issue is pretty simple to explain but I haven't found anything to solve it.

 

I have a normal date filter with "between" mode:

 

 

I need to model it so that when I open the report start and end date are not the minimum and the maximum ones but they should be set to show data from last completed month. For example:

  • if today it's April, 30th --> it should be set from March, 1st to March, 31st
  • if it's May, 1st --> it should be set from April, 1st to April, 30th

Then if I want to change the date range of course I can, but when I open it I should find it set showing last completed month. I can do it with a bookmark, but I want to know if there is a way to do it directly without creating any bookmark.

 

Is there a way?

 

Thank you so much.

 

Nick

10 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    So generally you would create a calculated column to flag last month dates and then use that as a filter in your slicer.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you Greg_Deckler  for answering.

       

      I already tried but if I use this filed as a visual filter it doesn't work. I see it works if I use a date column on my data table but I am using data coming from Calendar function (my field is Date = CALENDAR(MIN(My_Date); MAX(My_Date)) ) and it looks not influenced by the filter you are suggesting.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you amitchandak for your hint.

       

      Well it would be nice, but I'd need to keep the filter in between mode and opening it with last month already selected dynamically. You suggestion is good but I want to have this kind of slicer and possibly add some code/column/measure/whatelse to achieve it.