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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Default slicer value

  • Hi all, 

 

I was wondering if anyone could help on this am I have a requirement to make power bi slicer defaults to the latest date the data load in my model. I have been able to create calculated column with 

Latestdate= IF (file[date]=Max(filedate) 'Current-file', " " & file[date].

 

I have then used this as a slicer where selection is default to Current-file text . I however would like to see a date instead of current-file,

 

thanks if you can help.

7 REPLIES 7
PBI_Helpline
Helper I
Helper I

You have already done the workaround to select a latest date, which is to add a calculated column and map the latest date with  "Latest Date".
As of now, i dont think there is a workarround to get the actual latest date automatically changing with latest date for each refresh in a Power BI native slicer.
it stick with the date if selected, even if the data is not available for that day, you need to manually unselect that selection.
For a workarround, you can use  Slicer type "Between", and select the full date range in the slider.

Check out below for Interesting Power BI and DAX solutions.
https://www.youtube.com/c/PowerBIHelpline/

Anonymous
Not applicable

Hi @v-yadongf-msft  thanks . 
but my question was how do I make the current date default selection when it is published to power BI service . 

Hi @Anonymous ,

 

Can you share with me some screenshots of your data after hiding sensitive information and tell me what's your expected output?

 

Thanks for your efforts & time in advance.

 

Best regards,

Yadong Fang

Anonymous
Not applicable

Slicer file..png

Hi above is my slicer where i use calculated column to grab Current_file 

with  Max(Table[datecolumn])

is there a way to show current_file the actual date let say 21 october instead 

Hi @Anonymous ,

 

I'm confused about your calculation logic: 

Latestdate= IF (file[date]=Max(filedate) 'Current-file', " " & file[date].

 

Why did you use IF function instead of using Max(filedate) directly?

 

Best regards,

Yadong Fang

Anonymous
Not applicable

I used IF because i want the other dates to be showing as well and not just the Max date.

v-yadongf-msft
Community Support
Community Support

Hi @Anonymous ,

 

This is my test table:

vyadongfmsft_0-1666319096042.png

 

If you want to get the latest date, please create a new column like below:

Latestdate = MAX('Table'[Date])

vyadongfmsft_1-1666319206686.png

 

Create a slicer:

vyadongfmsft_2-1666319252833.png

 

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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