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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
abeirne
Helper II
Helper II

Relative date based on slicer date

Hi all, I am trying to show a 3 week snapshot based on the selected date that the user chooses. 

3 Week Snapshot.PNG

So for 1/1/2022, in the table i would like to only see 1/1/2022 to 1/21/2022 and the bookings associated with those dates. Both of the dates being used in the slicer and table are the same date column in the Calendar table. I tried ranking the dates but that appears to be ranking per row in the table. Thank you for the help. 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @abeirne 

 

you would

1) need an isolated table for the Date slicer

2) plot the table visual with a measure refering the slicer-selected value like this:

@Booking = 
VAR _date  = SELECTEDVALUE(datetbl[Date])
RETURN
CALCULATE(
    MAX(data[Booking]), 
    KEEPFILTERS(data[Date]>=_date &&data[Date]<=_date+13)
)

 

i worked like this:

FreemanZ_1-1671850219843.png

FreemanZ_2-1671850250829.png

FreemanZ_3-1671850273285.png

 

 

View solution in original post

1 REPLY 1
FreemanZ
Super User
Super User

hi @abeirne 

 

you would

1) need an isolated table for the Date slicer

2) plot the table visual with a measure refering the slicer-selected value like this:

@Booking = 
VAR _date  = SELECTEDVALUE(datetbl[Date])
RETURN
CALCULATE(
    MAX(data[Booking]), 
    KEEPFILTERS(data[Date]>=_date &&data[Date]<=_date+13)
)

 

i worked like this:

FreemanZ_1-1671850219843.png

FreemanZ_2-1671850250829.png

FreemanZ_3-1671850273285.png

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.