Would you be able to post a twbx file of your workbook?
Thank you so much for taking the time to respond. Attached is the work book
Ideally, I would like the forecast line shown in the first picture to extend til the end of 2012.
Forecast.twbx.zip 26.1 KB
Attached is a solution that I think will meet your needs. I started with the dates. In a way, your view is not about the time period that you have data for, but the whole year. Tableau doesn't draw marks where it doesn't have data, so we have to give it a year to work with. I've got a table that has one column for each day of the year for several years that I use, some people use a SQL cross product to generate a bunch of dates. Once I added this datasource, then I set up a field in it to match the Week dimension you'd created in the original datasource, so Tableau's blending would be able to work.
Then I started with the Days datasource and dragged the Week dimension into the view, so the Days would be the primary datasource. Then I dragged the Running Sum of Passing and Passing Rate measures into the view. Then I copied the Goals measure into the Days datasource, adjusted it so it was using the Week field from the Days datasource, then dragged that into the view. Now you have a line with a constant slope that extends out for the entire time displayed.
Finally, the Running Sum of Passing is calculated for every Week in the Days datasource, so the line extends out past where there's data - you can see this in the Original Running Sum of Passing view. I changed the Running Sum of Passing calc in the original datasource to be:
IF NOT ISNULL(ATTR([Week])) THEN
This way, the calc is only done when there is a value for Week in the original datasource.
Let me know if this works for you!
Forecast jtd edit.twbx.zip 54.7 KB
Excuse me, sir Johnathan, I was wondering if you could help me out with another portion of this viz.
I am trying to add a filter to this viz but either 1.) it tries to add it as a count or 2.) it says "cannot blend aggregated data from the secondary data source with the data on this sheet because there are no linking fields used in the view"
I am a novice when it comes to data blending and connecting secondary sources. I'm not exactly sure how to word and detail out my problem, sorry for any confusion. I think it is because secondary sources data is aggregated by default?
1.) Tableau doesn't let you add a discrete measure as a Filter. If you convert that measure into a (continuous) number, you'll be able to add it. I'm not sure why Tableau does this.
2.) For blending to work, You need to have fields from the primary datasource that exist in the secondary data source in the view (on Columns, Rows, and/or Marks card shelves). Then you can add the fields from the secondary data source and have them work. Tableau automatically considers any fields with the same name and data type in the primary and secondary as linking fields, otherwise you'll have to go to Data->Edit Relationships to configure relationships between the data sources. The fields that Tableau considers available for linking are indicated by the red/orange chain links, like the one in the screenshot you attached.
This video has a good walk through on blending: https://www.tableausoftware.com/videos/data-integration
Thank you for sending me the right direction. I found a resolution by changing my passing and failing calculation to include the filter within the calculation. I couldn't add filters for the secondary datasource, but the workaround works!
Thank you for your help.