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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jcastr02
Post Prodigy
Post Prodigy

preset filters, slicer or button to show last 7 days

Is there a 

preset filters, slicer or button to show last 7 days.  I have visuals that have comments from a survey and there is tons of content, but I just want something to press or hyperlink to show last 7 days or last month perhaps?
4 REPLIES 4
Anonymous
Not applicable

Hi @jcastr02 ,

 

There are so many ways to achieve this, But since you have mentioned Buttons I'm giving solution by using buttons slicer.

 

Here, I'm going to make Button which will show last week number when press. You could change the formula according to your requirement.

 

Create a new Column like This :

LastWeekButton =
VAR LastWeek =
    WEEKNUM ( TODAY () ) - 1
RETURN
    IF ( WEEKNUM ( 'Table.Date' ) = LastWeek, "Last Week", "Full Data" )

 

Now Use this column as a button slicer in your report.

 

Regards,

Gaurav Raj Singh

https://www.linkedin.com/in/gauravrajsingh/ 

jcastr02
Post Prodigy
Post Prodigy

 

Use a relative date slicer. The same option is available in Visual or Page level filter in filter pane

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range

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
dm-p
Super User
Super User

Hi @jcastr02,

For simple cases, you can use relative date filtering in the filter pane or a slicer.

If you want something more interactive or customisable, this can be done, but due to the fact that dates overlap for multiple ranges (e.g. last 7 days, last month), you'll need to have a date table and then an additional 'time intelligence' table branching off that.

You can then make a slicer from your Period field in that table and it will filter your dates and cascade through accordingly.

It's quite tricky to cover in a reply without specifics, but Phil Seamark has written an excellent tutorial on how to set it up, and this works incredibly well. I use this design pattern over most of my financial reports. Hopefully this will be what you need.

Good luck!

Daniel


If my post solves your challenge, then please consider accepting as a solution to help other forum members find the answer more quickly 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.