cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Spudduk
Frequent Visitor

Specific Number of Days in a Page Level Filter

Quick one, which is doing my head in....

 

How do I create a page filter to only looks at Todays date + 2... 

 

In the relatve filter its either pulling in today or Today +1 and Today +2.  I only want to see Today +2. Was hoping to get away with 

 

Have created a measure but can't apply to this to the page filter.

 

Cheers 

 

Andy

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

Hi , @Spudduk 

According to your description, you want to filter the Today+n data in the visual .

Here are the steps you can refer to :

(1)This is my test data:

vyueyunzhmsft_0-1669950220622.png

(2)We can create a what-if parameter as a slicer :

vyueyunzhmsft_1-1669950307644.png

vyueyunzhmsft_2-1669950324147.png

(3) Then we can create a measure :

Measure = var _slicer =[Parameter Value]
var _date =TODAY()+_slicer
return
CALCULATE( SUM('Table'[Value]) , KEEPFILTERS( 'Table'[Date] = _date))

(4)Then we put the fields we need on the visual and we can meet your need :

vyueyunzhmsft_3-1669950381340.png

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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-yueyunzh-msft
Community Support
Community Support

Hi , @Spudduk 

According to your description, you want to filter the Today+n data in the visual .

Here are the steps you can refer to :

(1)This is my test data:

vyueyunzhmsft_0-1669950220622.png

(2)We can create a what-if parameter as a slicer :

vyueyunzhmsft_1-1669950307644.png

vyueyunzhmsft_2-1669950324147.png

(3) Then we can create a measure :

Measure = var _slicer =[Parameter Value]
var _date =TODAY()+_slicer
return
CALCULATE( SUM('Table'[Value]) , KEEPFILTERS( 'Table'[Date] = _date))

(4)Then we put the fields we need on the visual and we can meet your need :

vyueyunzhmsft_3-1669950381340.png

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

djurecicK2
Resident Rockstar
Resident Rockstar

Hi @Spudduk ,

 Assuming you are using a date table called"Dates", create a calculated column called

IsTodayPlus2 = IF(Dates[Date]= (TODAY() + 2),True, False)
 
Then set your filter to IsTodayPlus2 is true.
 
Please accept as solution if this answers the question- thanks!

 

djurecicK2_0-1669908354395.png

 

 


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

Helpful resources

Announcements
Winner of T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Find out who won the T-Shirt Design Challenge and the top 3 finalists.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

Top Solution Authors