3 Replies Latest reply on Sep 3, 2018 9:37 AM by Nitin Paighowal

    Clubbed Total within View

    madhuri.gajjala

      Hi Team,

       

      I have a scenario,where i wanted to show clubbed totals of Central & South as "Top Sales",another clubbed one East & West as " Low Sales".Underneath the Grand Sales within the View as a row,same as how we display grand total.

       

      How can we bring in this in Tableau.

      EXAMPLE CLUBBED.JPG@

        • 1. Re: Clubbed Total within View
          Sankarmagesh Rajan

          Hi Madhuri

           

          are you looking something like this

           

          Create union and custom sql below

          SELECT [Orders].[Category] AS [Category],

              [Orders].[Region] AS [Region],

              [Orders].[Sales] AS [Sales],

            [Orders].[Segment] AS [Segment],

              [Orders].[State] AS [State],

          'Data' as [Aliasname]

          FROM [Orders]

          union

          SELECT [Orders].[Category] AS [Category],

              [Orders].[Region] AS [Region],

              [Orders].[Sales] AS [Sales],

            [Orders].[Segment] AS [Segment],

              [Orders].[State] AS [State],

          'Total' as [Aliasname] 

          FROM [Orders]

           

          Try to add calculation as below

          if [Aliasname]='Data' then [Region]

          elseif CONTAINS('Central,South',[Region]) then 'Low Sales'

          else 'Top Sales'

          END

           

          Use this in row and add sales in text. show grand total.

           

          Thanks

          sankar

          • 2. Re: Clubbed Total within View
            madhuri.gajjala

            Thanks for response.But Not like this,I want same as my shared screenshot.

            • 3. Re: Clubbed Total within View
              Nitin Paighowal

              Hello Madhuri,

               

              You have to create 2 different sheets and show them on your dashboard like this

              One without grouping and another with groupings

              attached is the solution.

               

              Please mark the solution as correct answer if it solved your query.

              1 of 1 people found this helpful