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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Krishna2456
Frequent Visitor

undefined

I have a date column, in which new values get added frequently not daily. Example values given below
2025-04-07,

2025-04-05,

2025-04-02.

I want to create a slicer where by default select latest available date.
How can be done.
Note: In filters it can be done, but in slicer visual how to do it?

1 ACCEPTED SOLUTION
pankajnamekar25
Super User
Super User

Hello @Krishna2456 

 

You can use the dax for calculated column

 

LastDateLabel =
VAR LatestDate = CALCULATE(MAX('YourTable'[Date]), ALL('YourTable'))
RETURN
IF(
'YourTable'[Date] = LatestDate,
"Last Date",
RELATED('d_Calendario'[Date]) -- or FORMAT(RELATED(...), "yyyy-mm-dd") if you want a formatted text
)

 

use this column to slicer keep last date selected in slicer

 

Thanks,
 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

View solution in original post

6 REPLIES 6
v-echaithra
Community Support
Community Support

Hi @Krishna2456 ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,

Chaithra E.

v-echaithra
Community Support
Community Support

Hi @Krishna2456 ,

We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Chaithra.

v-echaithra
Community Support
Community Support

Hi @Krishna2456 ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,

Chaithra E.

danextian
Super User
Super User

Hi @Krishna2456 

If you want the actual latest date to be selected by default—rather than using a label like "latest date"—you’ll need to use Tabular Editor. Specifically, you can use the *Group By Columns* property to store a filter based on an alternate value, which acts as the key for the entity. Power BI stores this key behind the scenes, allowing the visible filter value to update automatically.

For example, if May-24 is selected and has a key of 0, then when June arrives, June will take the key 0 and May will shift to 1. This causes the slicer to automatically reflect the most recent date without any manual change. If you're not comfortable using this method, you'll need to explore other alternatives provided.

Please refer to this video-https://www.youtube.com/watch?v=MrEAZREQuXM&ab_channel=DAXJutsu 







Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
pankajnamekar25
Super User
Super User

Hello @Krishna2456 

 

You can use the dax for calculated column

 

LastDateLabel =
VAR LatestDate = CALCULATE(MAX('YourTable'[Date]), ALL('YourTable'))
RETURN
IF(
'YourTable'[Date] = LatestDate,
"Last Date",
RELATED('d_Calendario'[Date]) -- or FORMAT(RELATED(...), "yyyy-mm-dd") if you want a formatted text
)

 

use this column to slicer keep last date selected in slicer

 

Thanks,
 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

bhanu_gautam
Super User
Super User

@Krishna2456 Create a new measure to get the latest date:

LatestDate = MAX('YourTable'[DateColumn])

 

Create a new column to flag the latest date:

IsLatestDate = IF('YourTable'[DateColumn] = [LatestDate], 1, 0)

 

Add a slicer visual to your report.
Drag the DateColumn to the slicer.

Click on the slicer visual to select it.
In the "Filters" pane, add the IsLatestDate column to the filters on this visual.
Set the filter to show only items where IsLatestDate is 1.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors