Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
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?
Solved! Go to Solution.
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.
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,
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.
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,
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
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.
@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.
Proud to be a Super User! |
|
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!