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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Sdd15c
New Member

Dynamic 4-Week Lookback from One Date Slicer

Hi! I’m trying to make 4 visual tables on one page show metrics for different weeks with the dates being controlled by on slicer.

My fact table is related to my date table through the Reporting Date column, and that Reporting Date is always a Monday (the day the weekly report is pulled).

 

I want to use a slicer where, when I select a specific Monday:

Visual Table 1 displays metrics for that selected week.

Visual Table 2 automatically displays metrics for the week immediately before it (selected week − 7 days).

Visual Table 3 displays metrics for two weeks prior (selected week − 14 days).

Visual Table 4 displays metrics for three weeks prior (selected week − 21 days).

 

When the slicer selection changes, the “current week” table should update to the newly selected week, and each subsequent table should automatically shift relative to that new selection.

 

All tables have the same measures. Is this possible?

3 REPLIES 3
Ray_Minds
Solution Supplier
Solution Supplier

Please find the below steps to achieve that 
Fact Table

image.png

Date Dimension Table 

image.png

image.pngimage.png

Hence, All values matching as per source data 

We can also make it dynamic within a single measure – Please feel free to let us know if you need any help around that 

cengizhanarslan
Super User
Super User

Step 1) Capture the selected Monday

Selected Week =
SELECTEDVALUE('Date'[Date])

Make sure:

  • Your slicer is single-select

  • It uses the Date table (not the fact table)

 

Step 2) Create offset measures

Metric – Week 0 =
VAR SelectedMonday = [Selected Week]
RETURN
CALCULATE(
    [Your Metric],
    'Date'[Date] = SelectedMonday
)

Metric – Week -1 =
VAR SelectedMonday = [Selected Week]
RETURN
CALCULATE(
    [Your Metric],
    'Date'[Date] = SelectedMonday - 7
)

Metric – Week -2 =
VAR SelectedMonday = [Selected Week]
RETURN
CALCULATE(
    [Your Metric],
    'Date'[Date] = SelectedMonday - 14
)

Metric – Week -3 =
VAR SelectedMonday = [Selected Week]
RETURN
CALCULATE(
    [Your Metric],
    'Date'[Date] = SelectedMonday - 21
)

 

Step 3) Use the correct measure in each table

Table 1 → use Metric – Week 0

Table 2 → use Metric – Week -1

Table 3 → use Metric – Week -2

Table 4 → use Metric – Week -3

Each visual now automatically shifts relative to the slicer selection.

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.
Xian-Zuo
Regular Visitor

It's possible.

The scenario you describe is essentially a kind of time intelligence, which can be achieved through measurement values ​​and calculation groups.
like this.

XianZuo_0-1772178310832.png

Measure = MIN('dim_date'[date])&"~"&MAX('dim_date'[date])
Measure - 7 day = CALCULATE(
    [Measure]
    ,DATEADD('dim_date'[date],-7,DAY)
)
Measure - 14 day = CALCULATE(
    [Measure]
    ,DATEADD('dim_date'[date],-14,DAY)
)
Measure - 21 day = CALCULATE(
    [Measure]
    ,DATEADD('dim_date'[date],-21,DAY)
)

Another way is to write code in a calculation group that can be applied to different measures, which looks like different slicers are used

XianZuo_1-1772178594325.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.