cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
scorbin-j
Frequent Visitor

How to get a slicer to show the current week and next N weeks?

I would like to get my date slicer to filter for the current week and the upcoming 2 weeks (or any number). Is this possible? Right now the "Relative Date" slicer option has the "Next 3 Weeks", but that does not show the current week. If I use the "This Month" option, that stops at the last day of the current month and doesn't show a full month's time into the next month. 

 

So using this: 

scorbinj_0-1675195244450.png

 

I get these results: 

scorbinj_1-1675195258470.png

 

I would like to basically set the results back one week to include the current week. Is this possible either through another visual or a measure? 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@scorbin-j,

 

Try adding a Relative Week column to your date table:

 

Relative Week = 
VAR vToday = TODAY()
VAR vWeekEndDate =
    [Date] - WEEKDAY ( [Date], 1 ) + 7
VAR vWeekEndDateToday =
    vToday - WEEKDAY ( [Date], 1 ) + 7
VAR vResult =
    CONVERT ( ( vWeekEndDate - vWeekEndDateToday ) / 7, INTEGER )
RETURN
    vResult

 

Add this column as a filter to your date slicer:

 

DataInsights_0-1675870428724.png

 





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

Proud to be a Super User!




View solution in original post

1 REPLY 1
DataInsights
Super User
Super User

@scorbin-j,

 

Try adding a Relative Week column to your date table:

 

Relative Week = 
VAR vToday = TODAY()
VAR vWeekEndDate =
    [Date] - WEEKDAY ( [Date], 1 ) + 7
VAR vWeekEndDateToday =
    vToday - WEEKDAY ( [Date], 1 ) + 7
VAR vResult =
    CONVERT ( ( vWeekEndDate - vWeekEndDateToday ) / 7, INTEGER )
RETURN
    vResult

 

Add this column as a filter to your date slicer:

 

DataInsights_0-1675870428724.png

 





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

Proud to be a Super User!




Helpful resources

Announcements
Vote for T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors