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
Dunner2020
Post Prodigy
Post Prodigy

Setting upper limit of date range to Today()

Hi there,

 

I have date range selector. I want to restrict the date selection between 1/4/2020 to Today() or now(). I know that we can apply the date filter on the visual to set the date. But in this case, I want to set upper limit as Today() so that I dont change everyday./ Is there anyway of doing that in BI?

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Dunner2020 , I doubt any option for that. Check if the timeline slicer has any option for that. But I doubt

View solution in original post

v-robertq-msft
Community Support
Community Support

Hi, @Dunner2020 

According to your description, you want to set the upper value of Slicer to today, I suggest you create a calendar table and associate it with the main table. You can try my steps:

  1. Create a calculated table:

Date = CALENDAR(DATE(2020,1,4),TODAY())

 

  1. Create link in Model view, like this:

v-robertq-msft_0-1605174202161.png

 

  1. Create a Slicer and place the ‘Date’[Date], and you can get what you want, like this:

v-robertq-msft_1-1605174202196.png

 

You can download my test pbix file here

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

View solution in original post

4 REPLIES 4
v-robertq-msft
Community Support
Community Support

Hi, @Dunner2020 

According to your description, you want to set the upper value of Slicer to today, I suggest you create a calendar table and associate it with the main table. You can try my steps:

  1. Create a calculated table:

Date = CALENDAR(DATE(2020,1,4),TODAY())

 

  1. Create link in Model view, like this:

v-robertq-msft_0-1605174202161.png

 

  1. Create a Slicer and place the ‘Date’[Date], and you can get what you want, like this:

v-robertq-msft_1-1605174202196.png

 

You can download my test pbix file here

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

amitchandak
Super User
Super User

@Dunner2020 , I doubt any option for that. Check if the timeline slicer has any option for that. But I doubt

Dunner2020
Post Prodigy
Post Prodigy

@amitchandak , I can still select the date outside the range by clicking on to and from date fields of date slicer (my slicer is disabled, only to and from date fields are visible). When I click on the date fields the calendar appears and I can select the date outside the specified range. Is there a way that we greyed out the date outside the specified range so that user could not select the dates outside the range.

amitchandak
Super User
Super User

@Dunner2020 , You can create a new column in date Table and use that as slicer or page level filter

 

New column = if([Date] >=Date(2020,04,01) && [Date] <=Today(), "Yes", "No")

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.