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

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

 

 

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.