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
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
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.