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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

default Slicer value

Hi guy's

 

i have date Slicer in UAT level, here i selected manually max value. after that if i published into Prod level i want selected automatically max date value on slicer. 

 

Slicer.JPG

regrads,

Navin_512

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Navin512 , Create a column like this in the date table and use it by default (Today or Last Date

Tipo de fecha: SWITCH(TRUE(),'Date'[Date]-TODAY(),"Today"
,'Date'[Fecha]-TODAY()-1,"Yesterday"
,'Date'[Fecha]&"")

Tipo de fecha: SWITCH(TRUE(),'Date'[Date]-maxx(sales,sales[date]),"Last Date"
,'Date'[Fecha]&"")

View solution in original post

Greg_Deckler
Super User
Super User

@Anonymous So, unfortunately this is a very common and yet kind of unsolved problem. There are work-a-rounds however. One is to use the Relative Date Slicer. Another is to create a column like this:

DateSlicer Column = 
  VAR __Max = MAX('Table'[Date])
RETURN
  IF([Date]=__Max,"Latest",[Date]&"")

Then you can set your slicer to Latest. 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

As Greg_Deckler and amitchandak said, current power bi slicers not provide the default selection value features.

You can refer to their tricks that share above to mark specific range dynamically and use bookmark to save these selections to quickly restore the sleicotn of your filters. 

We can use a bookmark to save current filter effects of the specific report and use it to quickly restore selections; when you work on the service side, it allows the end-users to configure personal bookmarks to achieve default selection.

Create bookmarks in Power BI Desktop to share insights and build stories 

What are bookmarks? 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Greg_Deckler
Super User
Super User

@Anonymous So, unfortunately this is a very common and yet kind of unsolved problem. There are work-a-rounds however. One is to use the Relative Date Slicer. Another is to create a column like this:

DateSlicer Column = 
  VAR __Max = MAX('Table'[Date])
RETURN
  IF([Date]=__Max,"Latest",[Date]&"")

Then you can set your slicer to Latest. 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@Navin512 , Create a column like this in the date table and use it by default (Today or Last Date

Tipo de fecha: SWITCH(TRUE(),'Date'[Date]-TODAY(),"Today"
,'Date'[Fecha]-TODAY()-1,"Yesterday"
,'Date'[Fecha]&"")

Tipo de fecha: SWITCH(TRUE(),'Date'[Date]-maxx(sales,sales[date]),"Last Date"
,'Date'[Fecha]&"")

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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