4 Replies Latest reply on Mar 15, 2018 2:04 AM by Albert Briner

    Calculated Fields independent of Data Source?

    Albert Briner

      I have a string parameter the user uses to indicate the date range, e.g. 'This Year', 'Last Year' etc. I have calculated fields that determine the start date and end date from that range. I have two data sources and would like to filter data from both sources based on said start and end dates. This works fine for data from the same source as the calculated fields are defined for. Filtering data from the other source seems to incur restrictions such as "All fields must be aqqreqate or constant when using table calculation functions or fields from multiple data sources."


      It seems like conceptually, one would want to have calculated fields that are independent of any data source (because they are independent of data) and could therefore be compared with data from any source without restrictions.


      Is there such a construct in Tableau?


      (My current workaround is to define said calculated fields multiple times, once for each data source with the exact same definition, but that is a maintenance overhead. Is there a better workaround?)