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
susheel1347
Helper III
Helper III

Slicer default to latest date of a column

Hi All,

I am trying to have the default date of the slicer to latest date of the column and it should have option to select different date later if user wants. The data of the column changes everyday & adds latest dates. I am struck. Can you please help?

1 ACCEPTED SOLUTION

@susheel1347 So, it sounds like you want this:

Column = IF([Date]=TODAY(),"Today",[Date]&"")

Then you would need to set the slicer to "Today" and save the report. Now Today will always be the default in the report and what rows are "Today" will change over time as the data is refreshed. 


@ 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

6 REPLIES 6
v-shex-msft
Community Support
Community Support

Hi @susheel1347

I think Greg_Deckler 's format should suitable for your requirement.
I modify his formula to compare with the last date form your table and marked it as 'last'.  You can use this as the source of slicer, The '.last' option will be fixed on the top of the slicer lists and recalculated when your table records changes.

Marked =
IF ( [date] = MAXX ( ALL ( Table ), [date] ), ".Last", [date] & "" )

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

@susheel1347 You can use a relative date slicer or create a column that identifies "current" and "other" and add add a slicer for that.


@ 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...

@Greg_Deckler  Thanks for the reply. I am looking for single selection slicer & default date. 

@susheel1347 So, it sounds like you want this:

Column = IF([Date]=TODAY(),"Today",[Date]&"")

Then you would need to set the slicer to "Today" and save the report. Now Today will always be the default in the report and what rows are "Today" will change over time as the data is refreshed. 


@ 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

@susheel1347 , You have no option to do that, You can create a column like this and use that in filter

 

Date Type =
SWITCH(TRUE(),
'Date'[Date] = TODAY(), "Today",
'Date'[Date] = TODAY() -1 , "Yesterday",
[Date]& "")

@amitchandak  Thanks! I can create a column but it will not be defaulted to latest. 

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.