4 Replies Latest reply on Jun 19, 2018 9:52 AM by Joe Oppelt

    Grand Totals just for Top n

    Swapna Chennam

      Hi,

       

      I am trying to get column level grand totals for the columns Lag 1 and Lag 2 selection. Wen the user selects Top 10, I am expecting 24725998 for Lag 1 selection and 26911723 for Lag 2 to be displayed at the Grand column level totals. Similarly when the use selects Top 20

        • 1. Re: Grand Totals just for Top n
          Joe Oppelt

          Your filter is a table calc.  When you use a table calc as a filter, it does not eliminate rows from the table.  It just controls what part of the table gets displayed.  (And you need it to work that way so that all the rows are in the table to get you the proper rank.)  That's how table calc filters work.

           

          What you will need to do is create your own total calcs.  And rather than do a quick table calc to rank [Forecast Quantity], make your own rank calc so that you can use it in the total calcs.

           

          WINDOW_SUM( IF [Rank calc] <= 10 then SUM([Forecast Quantity]) END )

           

          Take the Grand Total line off the sheet and make a separate sheet to do your grand totals.  Position the two sheets on a dashboard so that they look like one viz.

           

          I can do all that for you in your workbook, but I really don't have the time for that.  And you'll learn it better if you do it yourself.  I can come back and provide guidance when you get stuck though.  Just ping back and let me know.

          1 of 1 people found this helpful
          • 2. Re: Grand Totals just for Top n
            Swapna Chennam

            Thank You for the tip Joe! I will try it out and let you know.

            • 3. Re: Grand Totals just for Top n
              Swapna Chennam

              Hi Joe,

               

              This worked. Thank you. I applied the same method for calculating grand totals on a table calc. Doesn't seem to be working there. I read few forums on how we need to customize the grand totals calc when there is table calc involved, but didnt work for me. Any input would be appreciated,

               

              On Sheet 17

               

               

               

              Regards,

              Swapna

              • 4. Re: Grand Totals just for Top n
                Joe Oppelt

                V10.3 here

                 

                First of all, I'm trying to understand the Forecast  % Weighted Average calc.  Shouldn't that February value be 63.11%?

                 

                Tableau-generated grand totals of table calcs (especially ones that are not just simple sums) don't calc up the way you expect.  Your best bet is to create a second sheet of grand totals and position it abutting the data sheet on a dashboard to look like one viz.