Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Shamatix
Post Partisan
Post Partisan

Default date values in slicer

Hey fellow users of Power Bi,

 

I have a slicer with a from and to date  as seen on the below picture.

I want this slicer to ALWAYS start with the last years values, for example today its the 14-03-2018 so I want it to default to 14-03-2017 to 14-03-2018 HOWEVER I want the user to still be able to drag the slicer more to the "left" to expand it to years before 2017 as well.

I just want it to START with the latest year chosen by default, how is this possible?

1 ACCEPTED SOLUTION
McCow
Resolver III
Resolver III

Hi @Shamatix,

 

Please, try this solution:
2018-03-14 (2).png

 

 Here is the sample code

 

Left slicer is a switch between one year operations "1" (button slicer for control, from now-365 to now) and "All" dates.
"0" - is another dates (not last year) of need.

 

Best regs!

View solution in original post

1 REPLY 1
McCow
Resolver III
Resolver III

Hi @Shamatix,

 

Please, try this solution:
2018-03-14 (2).png

 

 Here is the sample code

 

Left slicer is a switch between one year operations "1" (button slicer for control, from now-365 to now) and "All" dates.
"0" - is another dates (not last year) of need.

 

Best regs!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.