1 of 1 people found this helpful
Hey DJ -
There's not too much to be said here, unfortunately. Parameter and Calculated Field definitions are part of the data source - so if you switch data sources, you lose 'em - it's the nature of the beast.
Most folks deal with this problem by doing a quick round of copying/pasting between the old and new data source. Just copy the calcs & params from the old data source to the new data source, and you'll be golden.
Warm up your CTRL-C / CTRL-V fingers!
Thanks for the response. Looks like some hand-crafting is required. I'll think through some techniques that might make this copy / paste more efficient, since I would like to replicate this basic Template viz and underlying Excel worksheet for a number of different workshops.
Also, I had some issues with the Replace Data Source process in V8. Going back to V7 allowed me to replace the data source, and then open / save the viz in V8. Cumbersome at best. Requested support on this issue and waiting response.
I had a similar issue with a client moving from one extract to another. You may be able to right-click the data source, Select "Edit Connection" and connect to the new data source. If all the field names are identical, you will have no issues at all.
Hope this helps,
1 of 1 people found this helpful
In addition, I received the following from Tableau Support regarding Replacing Data Sources. This seems a useful extension of the Answers provided here. Thanks !
Thank you for contacting Tableau Technical Support. I understand that following the steps in the 'Replacing a Data Source' article showed visualizations that were not interactive because parameters and calculations were not copied to the new data source. Is this correct?
When replacing a data source, only the user generated fields that were used in the workbook (placed on one of the shelves) when connected to the old data source will be moved. In addition, fields in the new data source with the same name as those in the old data source will overwrite those in the old data source. To move all calculated fields and parameters to the new data source, please place them on the view before replacing the data source.
And it doesn't make a lick of sense. Obviously if there are entries in the calcualted field that aren't in the new data source then those would fail (Tableau, put an icon in front of calc. field and/or color/font change). If the fields are the same in the new data source then why in the world would the calc. fields be dropped simply by changing a data source if they don't happen to be used? It's counter-intuitive.
The twbx file attached to this Comment has several Calc fields that combine measures from the data source with Parameters entered interactively. The Measure names (fields) used in these Calcs don't change from the Original to the Replacement data source, and all the Calcs do appear in the tabs of workbook. So, these all do seem to update.
I did change some of the other Measure names from Original to Replacement. These were used in some other Calcs, so I did need to go back and modify the formulas to incorporate the changes to these Measure names. I can't recall if there was a flag / exclamation point applied to these Calcs. All of these Calcs also appear in the workbook. But I certainly would not have known to be sure to include any that were not, simply in order to have them transfer from Original to Replacement data source.