0 Replies Latest reply on Feb 13, 2019 8:48 PM by Richard Foxworthy

    Aliases for data sources in calculated fields?

    Richard Foxworthy

      I have a Tableau analysis sheet where I need to ingest new data files regularly with updated data. The data is in exactly the same structure each time, and each data source is labelled with year/month/day - Eg the data sources are named something like Data 2019-02-13 and Data 2019-02-14. I need to perform calculations and display changes in various values between these dates, and currently I'm do this by using blended data sources in my calculated fields like this:

       

      ATTR ([Total Cost]) - ATTR ([Data 2019-02-13].[Total Cost])

       

      Right now I need to update each calculated field to find variation from previous data file. Is it possible to label these data sources something like 'Current' and 'Previous' so that my calculated fields can refer to the labels rather than to the actual date-named data sources - something like:

       

      ATTR ([Current].[Total Cost]) - ATTR ([Previous].[Total Cost])

       

      ie so that each time I add a new data source all I would need to do is label most recent one 'Current' and relabel previous one to 'Previous', and all my calculated fields would update.

       

      I don't want to actually rename the data source since its important for me to know what date each file was generated.

       

      Thanks