Hi guys,
i have a problem to convert output forecast data into dates. In this picture below, you guys can see the period and sub period in numeric type but i want to convert the period and sub period into dates in order to connect the original data by the field date, cause i need to use output to show in BI report. i'm newbie so i need you guys help with this problem, thanks in advance
Table 1: Output data
Period | Sub_Period | forecast_oil | forecast_oil_high_80 | forecast_oil_high_70 | forecast_oil_low_70 | forecast_oil_low_80 |
418 | 5 | 88.43885269 | 90.49591758 | 90.10246951 | 86.77523587 | 86.38178779 |
418 | 6 | 88.42331147 | 90.57986667 | 90.16738941 | 86.67923354 | 86.26675628 |
418 | 7 | 88.41817846 | 90.66983222 | 90.23916577 | 86.59719115 | 86.1665247 |
419 | 1 | 88.41807696 | 90.76097239 | 90.31285444 | 86.52329948 | 86.07518154 |
419 | 2 | 88.43122288 | 90.86193745 | 90.39702262 | 86.46542314 | 86.00050831 |
419 | 3 | 88.39221586 | 90.90768553 | 90.42655987 | 86.35787185 | 85.8767462 |
419 | 4 | 88.44428429 | 91.04174497 | 90.54493716 | 86.34363142 | 85.84682362 |
419 | 5 | 88.46772114 | 91.15396233 | 90.64017377 | 86.29526851 | 85.78147994 |
419 | 6 | 88.40670544 | 91.17265958 | 90.64362458 | 86.16978629 | 85.64075129 |
Table 2: Original data
Date | Price of Crude Oil/ barrel (USD) |
01/01/2011 | 92.19 |
02/01/2011 | 92.54 |
03/01/2011 | 92.86 |
04/01/2011 | 92.76 |
05/01/2011 | 92.91 |
06/01/2011 | 92.79 |
07/01/2011 | 92.20 |
08/01/2011 | 92.93 |
Solved! Go to Solution.
Hi @BlakeGriffin2093 , I believe there are some similar questions already on the community, but the process tends to be something like;
1. your datastream prior to the forecast, use a summerize tool to find the Max Date.
2. Append this MaxDate value to the datastream coming out of the forecast.
3. Use the datetimeadd() function to build out the true forecast dates.
I've attached an example for you, which assumes your forecast is at a day level.
Ben
you save my day, thanks so much. I also find another way to connect the original data and the forecast data, but it is difficult for others to understand.