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
Anonymous
Not applicable

Date Restriction for slicer

Hi Users,

 

I'm learning power bi. I would like to restrict the slicer as below and the visuals should interactive. Please help in achive this. 


Kumarcy_0-1604279030819.png

 

Thanks,.

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description, you want to create a Slicer which contains dates between today() to today()-30, and use the Slicer to interact with other visuals, you can follow my steps:

  1. Create a calculated table:
Date =

var _Calendar=CALENDAR(DATE(2020,1,1),DATE(2020,12,31))

var _today=FILTER(_Calendar,[Date]>=TODAY()-30&&[Date]<=TODAY())

return _today

 

  1. Create a connection between the ‘Date’ table and your main table, like this(This is my test data):

v-robertq-msft_0-1604390420121.png

 

  1. Create a Slicer, place ‘Date’[Date] into the Silcer, like this:

v-robertq-msft_1-1604390420127.png

 

 

And you can get what you want.

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

2 REPLIES 2
v-robertq-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description, you want to create a Slicer which contains dates between today() to today()-30, and use the Slicer to interact with other visuals, you can follow my steps:

  1. Create a calculated table:
Date =

var _Calendar=CALENDAR(DATE(2020,1,1),DATE(2020,12,31))

var _today=FILTER(_Calendar,[Date]>=TODAY()-30&&[Date]<=TODAY())

return _today

 

  1. Create a connection between the ‘Date’ table and your main table, like this(This is my test data):

v-robertq-msft_0-1604390420121.png

 

  1. Create a Slicer, place ‘Date’[Date] into the Silcer, like this:

v-robertq-msft_1-1604390420127.png

 

 

And you can get what you want.

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

@Anonymous , for date range it is not possible,

You need to have a slicer that can restrict days last that 30 days

 

You can have a column-like and try like this

Is Last 30 = if('Date'[Date]>=TODAY()-30 && 'Date'[Date]<=TODAY(),"Today",[Date]&"")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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