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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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)

Hi @Anonymous 

Can you provide some sample data?

 

Best Regards

Yolo Zhu

v-xinruzhu-msft
Community Support
Community Support

 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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors