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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

'Measure' vs 'Date' chart that ends at a selected slicer value

Hello,

 

I have a dashboard with a chiclet slicer that allows me to select which week I want all the measures to calculate in - this all works.

 

Except:

I have a chart with a measure over time - I want this to always show 4 weeks of data, ending at the selected week on the chiclet slicer.

 

I can turn the interactions off and it's (unsurprsingly) not affected by the chiclet slicer (what I'm currently doing) so I see all the data.

 

If I turn the interactions on, it only plots the week the chiclet is selected for.

 

I would have thought that using all(date_table) or removefilters(date_table) would ignore the chiclet interaction and plot the the measure over all dates in the date table, but no, I only see the week selected.

 

Here is the view when I have the interaction turned off

cbailey1994_2-1660127883865.png

 

 

here is the view when I have the interaction on:

cbailey1994_4-1660127946552.png

 

here is the ideal view (created manually using filters)

cbailey1994_5-1660128066885.png

 

While there's a chance I used them wrong (so please do challenge if so) - I have tried:

  • various iterations of: all() and removefilters() functions
  • creating a virtual table with all date_table
  • turning interactions off and trying to retrieve 'selectedvalue' from the chiclet slicer to create the date range, but without interactions I can't retrieve the value

 

Here is my code for the virtual table approach to get it plot all date values ignoring the filters

 

once so that I can then put manual filters on based on the selected value. Again - this only plots for the week selected on the filter.

 

 

Data Plot =
VAR selected =
    SELECTEDVALUE ( date_table[WeekOffset] )
RETURN
    SUMX (
        CALCULATETABLE (
            SUMMARIZE (
                date_table,
                date_table[Date],
                "Measure to Plot", CALCULATE ( [Measure], REMOVEFILTERS ( date_table[WeekOffset] ) )
            ),
            REMOVEFILTERS ( date_table[WeekOffset] ),
            date_table[WeekOffset] > selected - 4
        ),
        [Measure to Plot]
    )

 

 

Thanks so much in advance!

 

 

 

2 REPLIES 2
Anonymous
Not applicable

@amitchandak

 

Thanks so much for your response

 

While I think your solution will work for the graph, I think it will cause the other meaures on the dashboard to no longer be affected by the slicer? My problem is that I have other measures that I would like to continue to be filtered by the slicer

 

Is that right?

amitchandak
Super User
Super User

@Anonymous , if you select a week and you want for that that, then slicer need to on the independent date table

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max1 = maxx(allselected(Date1),Date1[Date])

var _max = _max1 - weekday(_max1,2) +7
var _min = _max -27
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))

 

 

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.

Top Solution Authors
Top Kudoed Authors