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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
socksinbox
Helper I
Helper I

Controlling range for the date slicer

Hi,

I have date slicer based on a date table which has values b/w 2017 and 2022 so this date slicer gives me range as per the table

 

Now i want to control this date range and only like to show date b/w 1 Jan 2019 till current date.

 

How can this be achieved?



1 ACCEPTED SOLUTION

HI @socksinbox ,

You can try to use below measure formula on 'visual level filter' to filter 'Y' result:

Measure filter =
VAR currDate =
    MAX ( Table[Date] )
VAR _calendar =
    CALENDAR ( DATE ( 2019, 1, 1 ), TODAY () )
RETURN
    IF ( currDate IN _calendar, "Y", "N" )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi,

Check if this helps:

You can create a new Date table with below DAX and link it to the original Date Dimension.

Then we can drag the date field from this table into the slicer.

DatesTillToday = CALENDAR( DATE( 2019,1,1 ),TODAY() )

Thanks.

Hi,

Sorry for note mentioning this before but creating a new date table won't help.

 

Is there not a way to filter the current table ranges with some kinda measure filter similar to something we do in Tableau with context filter?

HI @socksinbox ,

You can try to use below measure formula on 'visual level filter' to filter 'Y' result:

Measure filter =
VAR currDate =
    MAX ( Table[Date] )
VAR _calendar =
    CALENDAR ( DATE ( 2019, 1, 1 ), TODAY () )
RETURN
    IF ( currDate IN _calendar, "Y", "N" )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help 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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.