I assume the problem is you need to get data from a new file. If that's the case, have you tried to point the data connection (which you've already Pivoted) to a different file? I believe the Pivot will stay. Which means, if you schedule a refresh for an already pivoted data source, you don't need to pivot again as Tableau will take care of it automatically.
Let me know how it goes. Hope this helps.
Thanks. My problem is that for every data source, I have to pivot it in the "data source tab" before it goes into the workbook. Is there any solution for it?
Can you be more descriptive please? I'm confused with what you mean with 'every data source' and 'automate'. Perhaps if you attach an example we can figure something out,
Sure. Here is the scenario:
new data source: file1.csv -> pivot some of the columns -> go to the workbook -> replace the old data source as file1.csv
new data source: file2.csv -> pivot some of the columns -> go to the workbook -> replace the old data source as file2.csv
the same repeat...
basically, file1 and file2 has the same data structure and I need to pivot the same columns every time.
Thanks, Ruofei! Here's an alternative... This one will save you the pivot step, although you'd still have to do this 'manually' from Tableau Desktop. Instead of replacing one data source with another, you can just update the connection to use the new file:
If you do this, you don't need to pivot everytime, as the connection is the same and persists this instruction.
Are you using Tableau Server or Online as well?