I'm trying to incorporate forecasting (using the fbprophet package) into a Tableau dashboard, but am coming across several errors. To do this, I mostly followed the presentation by Nathan Mannheimer (https://www.youtube.com/watch?v=nRtOMTnBz_Yhttp://)
For context, the dataset I have features aggregated marketing data across several different data sources (6) and clients (28). As you can imagine, each data source has different min/max dates, and there are gaps in data when a client is not marketing on these channels for those dates.
Here is the script I'm running to return forecasted data (measure name = "Forecast"), based on a period to forecast parameter, and a dynamic KPI selector:
Here is the date formula I'm using to populate [Dates] (I copied what Nathan did in his presentation):
I can only get this to run on account/channel combinations if every row has represented data. In this case, Paid Search across all clients is the only way to yield a result. See the table and chart below:
If I select a different channel, or filter by client, I receive the following error:
And furthermore, if I try to drop rows that feature null values (df.dropna(subset=['ds'])), then I receive this error:
So - it looks like the script is wanting to pull all data from the dataset, and if I filter the data in Tableau, it is receiving an error because it's keeping the dataframe the same size and filling in Null values. If I try to drop those null values, then the list result differs from what Tableau expects, and it wont accept. Is there anything I can change in my calculations that will account for the level of detail I need? Ideally, I would like to create this where I can filter by any dimension in my dataset, and this script will run.
Unfortunately, I am unable to share a workbook since it contains sensitive information.
Let me know,
I am facing the same error in Tableau.Did you find any solution for this?
If so, please let me know what I need to change in my code.