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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

7 Day Rolling - Issues with date slicer

Hello,

 

I am trying to put togther a 7 day rolling average and the formula works, but when I use the slicer to select the amount of days I want to see (28, 42, 63) the first couple of days are not calculating the previous vaules it just starts to calculate from the begining of the period selected. I want those intial values to stay stable, continue the pattern, and not recalculate. Below the formula I am using.

 

► 7 day cancelled meetins =
averageX(
DATESINPERIOD(
'Team Schedules'[Scheduled_Department_Date],
LASTDATE('Team Schedules'[Scheduled_Department_Date]),
-7,
DAY),
CALCULATE([Cancelled Meetings]))
1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You should have a Calendar Table with a relationship from the Scheduled_Department_Date of the Team Schedules table to the Date column of the Calendar Table.  Create a Date slicer from the Calendar Table and select a certain date in that slicer.  Now try this measure

7 day cancelled meetins = averageX(DATESINPERIOD('Calendar'[Date],min('Calendar'[Date]),-7,DAY),[Cancelled Meetings])
Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

You should have a Calendar Table with a relationship from the Scheduled_Department_Date of the Team Schedules table to the Date column of the Calendar Table.  Create a Date slicer from the Calendar Table and select a certain date in that slicer.  Now try this measure

7 day cancelled meetins = averageX(DATESINPERIOD('Calendar'[Date],min('Calendar'[Date]),-7,DAY),[Cancelled Meetings])
Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.