Date Slicer default to fiscal year


#1

Hi Sam,
How do I default date slicer to start from current fiscal date 1st April 2018 to 31st March 2019 whenever user opens report. Once report is loaded user should have options to change dates to 1st april 2017 to 31st march 2018 etc. I am using Calendar table.

Thanks


#2

The idea for something like this is to create a column within your date table that acts like a switch for on and off.

Within your date table create a column with logic that works out what FY you are currently in and then turn that to TRUE and everything else to FALSE.

Something like this should do it.

Current FY = 
VAR CurrentFY = CALCULATE( SELECTEDVALUE( Dates[FY] ),
                    FILTER( ALL( Dates ), Dates[Date] = TODAY() ) )

RETURN
IF( Dates[FY] = CurrentFY, TRUE, FALSE )

Then you can use this in the page or report level filter like so.

This should do it.

Chrs


#3

Hi Sam,
I have date slicer . image


#4

Sam,
I have date slicer initially report should load 01/04/2018 , 31/03/2019. Later user can change startdate and enddate once they in report.

Please advice.


#5

Honestly don’t think you can do this in a dynamic way then.

You’ll just have to save the model with that slicer selection already made and then don’t save over it.

Then it will always be at that setting when someone opens the model.

You may also want to look at bookmarks, where you can have a certain setting that users could click to potential via an icon or shape.

See here for more on this idea

I personally like it and will try to incorporate the bookmarking idea in some future showcases


#6

Thanks Sam, will try.