Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Default Current Quarter

Hi All, I have a date slicer in my report where I need to default the time period slicer to current quarter but also be able to navigate to other dates of the calendar.  Regards, Vanshika  ...
  • Shosher's avatar
    2 years ago

    You sadly cant easely do this, However there are some options.

    You could work with bookmarks to have a switch button that gives the user to option to select the current quarter or a custom date. Current quarter can be a hidden filter. You add a new column in your calendar table that returns either a 0 or 1 depending on if that row is the current quarter. 

    So when the "Current Quarter" Option is selected you have a page filter or a hidden slicer that sets the entire page to either 0 or 1 depending on how you made your row. 

    When the "custom date" option is selected you make a bookmark empty the choices on your current quarter slicer and unhide your current date slicer. 

    Make sure to set the bookmark to only adjust selected measures and it should give you the requested result. 

    As a bonus you can add a third option to show relative dates. that would also show the current quarter and have the ability to do other stuff. This way you give your users all the possible options they could ever want. You can choose to only switch between a relative filter and the filter you currently use and it should give the expected result as long as your quarters line up with powerbi's quarters. 

    Make sure to set me as the result if this helped!