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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Anonymous
Not applicable

Using Past Average to Predict Future Outcome

I current have this DAX

AverageDemanLast6Weeks =
VAR StartDate = TODAY() - 42
VAR EndDate = TODAY()
RETURN
AVERAGEX(
    FILTER(
        'Date',
        'Date'[Date] >= StartDate && 'Date'[Date] <= EndDate
    ),
    [Total_Demand_Rate]
)
The DAX gives the average of the Demand Rate over the Last 6 Weeks.
Here is where I am having a challenge. 
I need to create a DAX that will do the following:
 
 If I select any day of the week in the future, if the date falls on a Monday, give me the result of All the averages for the last 6 Mondays. A typical example is if I select a date of 03/04/2024 (Which falls on a Monday). Then what i want to see is the average of the demand rates for the last 6 Mondays. (02/26/2024, 02/19/2024, 02/12/2024, 02/05/2024, 01/29/2024, 01/22/2024). If the selected date in the future falls on a Wednesday, I want the same result, show me the average of the demand rates for the last 6 Wednesdays.
What I am trying to predict is that based on the events of the last 6 weeks, We can assume we should be expecting the same or similar in the future.

 

3 REPLIES 3
Anonymous
Not applicable

Thank you for getting back Yolo,

So here is what I am trying to achieve. 

I have a DAX measure that has calculated the Average demand for the last 6 weeks. 
I want to have a new DAX that will do the following :
If I  select any day of the week in the future. For instance, if I select a Monday, what I would love to see the Average Demands for the Last 6 Mondays (The 6 Mondays in the calculated DAX)

Anonymous
Not applicable

Hi @Anonymous 

Can you provide some sample data?

 

Best Regards

Yolo Zhu

Anonymous
Not applicable

 Hi @Anonymous 

I don't quite understand how you want to use the last six weeks to predict future values, do you need to use Dax based on the last six weeks? Can you provide some more information and sample data so that can provide more information for you.

 

Best Regards

Yolo Zhu

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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