Forum Discussion
Forecast
- 3 years ago
Hi Antonio_Gomez ,
First I think you should calculate the [constant rate of use], then get the [remaining volume in the tank], and finally use a formula like the one below to get the forecast you want.
Measure = SUM(FactTable[remaining volume in the tank])-SELECTEDVALUE('Week'[Week])*SUM(FactTable[constant rate of use])Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 3 years ago
I decided to do this:
Starting from the equation of the line Y = aX + b and the historical values I calculated for several days differents approximations. For example:
With today's value and yesterday's values I could construct one equation
Today volume = 890
Yesterday volume = 910
Today (X) = 0
Yesterday (X) = -1
a = (Y1 - Y2) / (X1 - X2)
So,
a = (890 - 910) / (0 - (-1))
b = Y - aX (isolated from the original equation)
And if I have the "a" from the last result; Y = today's volume and X = Today (X) = 0; I could have "b" and construct one equation.
Now, with this equation: Y = -20X + 890; I could predict for the day I wanted.
If I want to know the volume in 7 days, just put Y = (-20 * 7) + 890 = 750
I did this for several days in the past and always with today's reference
Y1 = Same as above
X1 = Same as above
Y2 = 915
X2 = -2 (the day before yesterday)
Y1 = Same as above
X1 = Same as above
Y2 = 930
X2 = -3
So, for each equation created taking into account the days in the past (in this example are 3; X = -1, X = -2 and X = -3), I forecast 7 days in the future Y = a(7) + b and average the three results to have the more approximated value.
Hi Antonio_Gomez ,
First I think you should calculate the [constant rate of use], then get the [remaining volume in the tank], and finally use a formula like the one below to get the forecast you want.
Measure =
SUM(FactTable[remaining volume in the tank])-SELECTEDVALUE('Week'[Week])*SUM(FactTable[constant rate of use])
Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I decided to do this:
Starting from the equation of the line Y = aX + b and the historical values I calculated for several days differents approximations. For example:
With today's value and yesterday's values I could construct one equation
Today volume = 890
Yesterday volume = 910
Today (X) = 0
Yesterday (X) = -1
a = (Y1 - Y2) / (X1 - X2)
So,
a = (890 - 910) / (0 - (-1))
b = Y - aX (isolated from the original equation)
And if I have the "a" from the last result; Y = today's volume and X = Today (X) = 0; I could have "b" and construct one equation.
Now, with this equation: Y = -20X + 890; I could predict for the day I wanted.
If I want to know the volume in 7 days, just put Y = (-20 * 7) + 890 = 750
I did this for several days in the past and always with today's reference
Y1 = Same as above
X1 = Same as above
Y2 = 915
X2 = -2 (the day before yesterday)
Y1 = Same as above
X1 = Same as above
Y2 = 930
X2 = -3
So, for each equation created taking into account the days in the past (in this example are 3; X = -1, X = -2 and X = -3), I forecast 7 days in the future Y = a(7) + b and average the three results to have the more approximated value.