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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Khomotjo
Helper II
Helper II

Filter Visual to get last 30 days and the next 7 days

Hello everyone,

 

I have a visual that shows  performance on orders MTD , I want to also include orders in the system for the next 7 days. I have looked at the filtering options  but I cant find anything that will do what I want. Also this filter has to be automated, it should not require a person to put the dates in.

Khomotjo_0-1741943975211.png

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Create a measure like

Date is visible =
VAR CurrentDate =
    SELECTEDVALUE ( 'Date'[Date] )
RETURN
    IF ( CurrentDate >= TODAY () - 30 && CurrentDate <= TODAY () + 7, 1 )

Add that as a filter to the visual, set to only show when the value is 1.

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

Create a measure like

Date is visible =
VAR CurrentDate =
    SELECTEDVALUE ( 'Date'[Date] )
RETURN
    IF ( CurrentDate >= TODAY () - 30 && CurrentDate <= TODAY () + 7, 1 )

Add that as a filter to the visual, set to only show when the value is 1.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.