Hello,
I have a dataset that contains a cost field and a date field. This dataset has 12 data points, as the date for these costs is monthly.
I want to create a bar chart that will display the costs as Y-axis and date as X-axis. This is straightforward. However, I also want to show the next 12 months as a prediction or forecast for the next year. The calculation for future months will simply be (current month cost - previous month cost) / (previous month cost) * current month cost
What is the best way to create a calculated field that shows after my existing dataset’s costs, those new costs, and also display them for the next 12 months?
edit: i had written (current month cost - previous month cost) / (previous month cost) * current month
as my calculation, but that was wrong. it is supposed to just all be costs, so (current month cost - previous month cost) / (previous month cost) * current month cost
You cannot multiply a cost field ($ or numeric) with a date field (current month). Use the Forecast feature of Quicksight instead.
Steps -
- Click on the three dots on the top right of the visual
- Select ‘Add forecast’
*Note - Forecast only works if you aggregate date field by Month.
Attaching screenshots for your reference. Hope this helps.
Thanks!


1 Like
Thanks for responding! I have a couple questions -
- My dataset is only 12 datapoints for months, I think this article says that I need at least 43 data points to use forecasting. Is that true?
- When trying to add forecasting to my bar chart, I do not see it after clicking the 3 dots on the top right of the visual. Is this because I do not have enough datapoints, or is there another reason that I would not see it?
Using Amazon Forecast service could be another potential solution instead of creating calculated fields in Quick Sight. Follow the below steps to setup the same -
- Configure Forecast with a range of prediction Quantiles (0.1, 0.9 etc) on your s3 dataset.
- Dump the forecasted dataset back to your s3 bucket.
- Visualize it with Quicksight as a regular dataset.
It also gives you the ability to control the prediction parameters than manually using mom to predict future costs. Hope this is helpful.
Thanks!
2 Likes