2 Replies Latest reply on Oct 24, 2015 8:09 PM by Dick Sobel

    Getting a grand total from a table calculation

    Dick Sobel

      I have a couple of long columns which contain a calculated field. Each row has a calculated value for the calculated field.

       

      There are other columns where Tableau provides a grand total for non table calculated fields.

       

      However, when Tableau adds up the values ( Currency) from a table calculation, it returns an incorrect value in the grand total field and the only setting you have on the grand total field is "automatic". I know it is incorrect because doing a cross tab data extract to an excel sheet, the individual values do not add up to the correct total.

       

      Any thoughts?

      Richard

        • 1. Re: Getting a grand total from a table calculation
          Daniel Vincent

          You probably would need to do a calc like IF LAST()=FIRST() THEN...

           

          This will force the value you want when there is grand totals turned on.  Without seeing an example workbook I won't be able to help more than that.  If you are able to load up a packaged workbook I can probably help further.

          • 2. Re: Getting a grand total from a table calculation
            Dick Sobel

            Thanks Daniel

            Please see attached in version 9.1

             

            Have two issues.

             

            1) The Volume column is a formula that adds and subtracts some of the other columns in the work book.

            One component of the formula is the "mix" column.   The mix calculation works for the individual row items. However

            it does not provide a grand total. This is because the grand total for mix is a product of a percentage which is zero in the grand total times the sales difference dollars field.

             

            However when you download and cross tab the volume column you get a +68,000 rather than the negative 108,000. Again the actual row values for each transaction

            are correct.

             

            Believe the mix calculation might be interfering.

             

            My objectives are as follows:

             

            1. Would like the grand total for the Volume column to total correctly .... ~68,000

            2. Have the mix total -45,000 which is what the cross tab data shows.

             

            Perhaps there is a workaround to just add up the row values in the mix column to provide a total. Real value is -45,000.

            And for the Volume column to add correctly.

             

            Thanks

            Richard