4 Replies Latest reply on Oct 22, 2012 11:01 AM by Ricardo Mota

    Table Calculations with data from 2 data sources

    Ricardo Mota

      Hello

       

      I want to perform a table calculation (for example: Running Total ) from a calculated field that have data from 2 different data sources:

       

      Calculated Field:  A) SUM([Sales]) / B) SUM(COGS].[COGS] where A) are from a primary data source and b) from the secondary data source.

       

      When I do (for example: Running Total or % different ) I have a exclamation marc in tableau worksheet.

       

      If a make a Running Total just in B) it works.

       

      The example could be found in the Superstore Sales:

       

      Try to do a Running Total in the Calculated Field: Calculation1

       

      Thank you very much

       

      RFM

        • 1. Re: Table Calculations with data from 2 data sources
          Alex Kerin

          I have a suspicion you should delete that file - there looks to be personal information in there in two of the datasources.

           

          To answer your question, you can do them, but instead of using the quick table calculation, you can click customize and then OK and it will work as a normal calculation. Some won't such as % of total - you would need to look at other ways of getting to this, but I don't know what you are looking for.

          1 of 1 people found this helpful
          • 2. Re: Table Calculations with data from 2 data sources
            Ricardo Mota

            Thanks Alex

             

            I don't understand : I have a suspicion you should delete that file - there looks to be personal information in there in two of the data sources

             

            It was supersales store and now I cannot found it !

             

            Regarding the calculations:

             

            In the superstore sample we can create a calculated field with data from the superstore sales db and sales plan db. For example: SUM([Sales Current])/SUM([Sales Plan].[Sales Plan])

             

            Try to do a running total! it won't work.

             

            Thanks again

            • 3. Re: Table Calculations with data from 2 data sources
              Alex Kerin

              I asked Tracy to delete it - you had included three other datasources in with the superstore. At least two of them had sensitive information in them.

               

              You need to make the table calculation into a real calculation by clicking customize after right clicking the pill:

               

              customize.png

              • 4. Re: Table Calculations with data from 2 data sources
                Ricardo Mota

                Thank You Alex

                 

                It works.

                 

                I just don't understand why it must be a real calculation and not a table calculation?

                 

                I will create a series of indicators based on that item, so each time a needed a Running or a diference I must create a new calculation. It's not very practical but it's better than nothing

                 

                Thank you once again

                 

                RFM