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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Zulaikha
Frequent Visitor

Date slicer

Hi, I have a date slicer from dim_date table which is connected to the fact_tables. Now, I want the date filter to show todays date, even if there is no data available

Zulaikha_0-1734953143256.png

 

4 REPLIES 4
Anonymous
Not applicable

Thanks for the reply from Kedar_Pande and 123abc  , please allow me to provide some additional insights.

Hi @Zulaikha ,

You could create a new date table based on the minimum date in your 'dim_table'.

 

Date = 
ADDCOLUMNS(
    CALENDAR(
        MIN('Table'[Date]),
        TODAY()
        ),
        "Year", YEAR([Date]),
        "Month", MONTH([Date]),
        "Day", DAY([Date])
    )
    

 

It will refresh to the current date and we could use ‘Between’ in the date slicer setting

3.png

2.png

Don't forget to create a new relationship with the fact_tables.

Could you please provide example data or sample files here if you have any confused? We could offer you more help if we have information in detail. There is sensitive data that can be removed in advance. How to provide sample data in the Power BI Forum - Microsoft Fabric Community

Thanks for your understanding. Your time and cooperation are much valued by us. We are looking forward to hearing from you to assist further.

Best regards,

Lucy Chen

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

 

Kedar_Pande
Super User
Super User

@Zulaikha 

Use a measure to set today’s date as the default filter in the slicer.

DefaultDate =
IF(
MAX('dim_date'[Date]) = TODAY(),
1,
0
)

Add the DefaultDate measure.
Set the filter to show only rows where DefaultDate = 1.

This ensures the slicer highlights today’s date by default but still allows the user to select other dates if needed.

 

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

123abc
Community Champion
Community Champion

You can achieve this in Power BI by using a combination of DAX and setting the default value for your date slicer. Here’s a step-by-step guide:

  1. Create a New Measure:

    • Go to your dim_date table and create a new measure to get today’s date.
    TodayDate = TODAY()
  2. Add a Calculated Column:

    • Add a calculated column in your dim_date table to check if the date is today.
    IsToday = IF('dim_date'[Date] = TODAY(), 1, 0)
  3. Set Default Value in Slicer:

    • Add the IsToday column to your slicer as a filter and set it to 1. This will ensure that today’s date is selected by default.
  4. Adjust Slicer Settings:

    • Go to the slicer settings and ensure that it allows for single selection. This way, even if there’s no data for today, the slicer will still show today’s date.

By following these steps, your date slicer should default to today’s date, even if there’s no data available for that date. Let me know if you need any more help!

I want the slicer setting to be " Between "

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors