Tableau stacked and side-by-side bar chart on column aggregation











up vote
1
down vote

favorite












I have a data set like this



Name Occupation Payment Principal Interest
Amy Nurse 100 90 15
Becky Teacher 80 100 20
Catherine Nurse 90 75 15
John Engineer 90 80 12
Tom Teacher 120 100 20
... ... ... ... ...

I'd like to create side-by-side(Payment) stacked chart:



Row: Occupations
Column1 : stacked(Sum of Interest and Sum of LP Principal) by occupation



Column2 : Only Sum of LP Payment by occupation



Can anyone give me hint how to make it?










share|improve this question


























    up vote
    1
    down vote

    favorite












    I have a data set like this



    Name Occupation Payment Principal Interest
    Amy Nurse 100 90 15
    Becky Teacher 80 100 20
    Catherine Nurse 90 75 15
    John Engineer 90 80 12
    Tom Teacher 120 100 20
    ... ... ... ... ...

    I'd like to create side-by-side(Payment) stacked chart:



    Row: Occupations
    Column1 : stacked(Sum of Interest and Sum of LP Principal) by occupation



    Column2 : Only Sum of LP Payment by occupation



    Can anyone give me hint how to make it?










    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have a data set like this



      Name Occupation Payment Principal Interest
      Amy Nurse 100 90 15
      Becky Teacher 80 100 20
      Catherine Nurse 90 75 15
      John Engineer 90 80 12
      Tom Teacher 120 100 20
      ... ... ... ... ...

      I'd like to create side-by-side(Payment) stacked chart:



      Row: Occupations
      Column1 : stacked(Sum of Interest and Sum of LP Principal) by occupation



      Column2 : Only Sum of LP Payment by occupation



      Can anyone give me hint how to make it?










      share|improve this question













      I have a data set like this



      Name Occupation Payment Principal Interest
      Amy Nurse 100 90 15
      Becky Teacher 80 100 20
      Catherine Nurse 90 75 15
      John Engineer 90 80 12
      Tom Teacher 120 100 20
      ... ... ... ... ...

      I'd like to create side-by-side(Payment) stacked chart:



      Row: Occupations
      Column1 : stacked(Sum of Interest and Sum of LP Principal) by occupation



      Column2 : Only Sum of LP Payment by occupation



      Can anyone give me hint how to make it?







      tableau






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 9 at 16:18









      BruceBee

      262




      262
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          Your data is not in the correct format for the required chart and you need to do some data prep.




          1. Pivot all three measure fields from the data source page.


          enter image description here




          1. create a calculation to define the column for each data type


          enter image description here




          1. Build the chart as below and hide the header for column field.


          enter image description here






          share|improve this answer





















          • Thanks very much! But if original measures were gone after pivoting. For instance if I still want to plot a bar chart occupation vs Principal sum how to get data from Principal only?
            – BruceBee
            Nov 10 at 14:35










          • @BruceBee, use Pivot Field Names and apply a filter(Only include Principal)
            – Jose Cherian
            Nov 10 at 23:52










          • Yea thanks I think could only do it like this but not quite convenient that I need to rename axis in every plot using these variables. And if I want to create a new calculated field like ratio of Interest to Principal I don't know how to move on further :/
            – BruceBee
            Nov 12 at 0:50


















          up vote
          0
          down vote













          One approach that avoids reshaping your data is to use the measure names and measure values placeholder fields to create the stacked bar chart.



          See below
          enter image description here






          share|improve this answer





















          • sorry but it doesn't seem to be a very good idea since I do need a side-by-side bar chart.
            – BruceBee
            Nov 12 at 0:51










          • Then you need only choose “dual axis” for the second measure on the Columns shelf, and then put Measure Names on rows - should also synchronize axes.
            – Alex Blakemore
            Nov 12 at 16:10













          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53229495%2ftableau-stacked-and-side-by-side-bar-chart-on-column-aggregation%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          Your data is not in the correct format for the required chart and you need to do some data prep.




          1. Pivot all three measure fields from the data source page.


          enter image description here




          1. create a calculation to define the column for each data type


          enter image description here




          1. Build the chart as below and hide the header for column field.


          enter image description here






          share|improve this answer





















          • Thanks very much! But if original measures were gone after pivoting. For instance if I still want to plot a bar chart occupation vs Principal sum how to get data from Principal only?
            – BruceBee
            Nov 10 at 14:35










          • @BruceBee, use Pivot Field Names and apply a filter(Only include Principal)
            – Jose Cherian
            Nov 10 at 23:52










          • Yea thanks I think could only do it like this but not quite convenient that I need to rename axis in every plot using these variables. And if I want to create a new calculated field like ratio of Interest to Principal I don't know how to move on further :/
            – BruceBee
            Nov 12 at 0:50















          up vote
          1
          down vote













          Your data is not in the correct format for the required chart and you need to do some data prep.




          1. Pivot all three measure fields from the data source page.


          enter image description here




          1. create a calculation to define the column for each data type


          enter image description here




          1. Build the chart as below and hide the header for column field.


          enter image description here






          share|improve this answer





















          • Thanks very much! But if original measures were gone after pivoting. For instance if I still want to plot a bar chart occupation vs Principal sum how to get data from Principal only?
            – BruceBee
            Nov 10 at 14:35










          • @BruceBee, use Pivot Field Names and apply a filter(Only include Principal)
            – Jose Cherian
            Nov 10 at 23:52










          • Yea thanks I think could only do it like this but not quite convenient that I need to rename axis in every plot using these variables. And if I want to create a new calculated field like ratio of Interest to Principal I don't know how to move on further :/
            – BruceBee
            Nov 12 at 0:50













          up vote
          1
          down vote










          up vote
          1
          down vote









          Your data is not in the correct format for the required chart and you need to do some data prep.




          1. Pivot all three measure fields from the data source page.


          enter image description here




          1. create a calculation to define the column for each data type


          enter image description here




          1. Build the chart as below and hide the header for column field.


          enter image description here






          share|improve this answer












          Your data is not in the correct format for the required chart and you need to do some data prep.




          1. Pivot all three measure fields from the data source page.


          enter image description here




          1. create a calculation to define the column for each data type


          enter image description here




          1. Build the chart as below and hide the header for column field.


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 9 at 23:08









          Jose Cherian

          3,06812227




          3,06812227












          • Thanks very much! But if original measures were gone after pivoting. For instance if I still want to plot a bar chart occupation vs Principal sum how to get data from Principal only?
            – BruceBee
            Nov 10 at 14:35










          • @BruceBee, use Pivot Field Names and apply a filter(Only include Principal)
            – Jose Cherian
            Nov 10 at 23:52










          • Yea thanks I think could only do it like this but not quite convenient that I need to rename axis in every plot using these variables. And if I want to create a new calculated field like ratio of Interest to Principal I don't know how to move on further :/
            – BruceBee
            Nov 12 at 0:50


















          • Thanks very much! But if original measures were gone after pivoting. For instance if I still want to plot a bar chart occupation vs Principal sum how to get data from Principal only?
            – BruceBee
            Nov 10 at 14:35










          • @BruceBee, use Pivot Field Names and apply a filter(Only include Principal)
            – Jose Cherian
            Nov 10 at 23:52










          • Yea thanks I think could only do it like this but not quite convenient that I need to rename axis in every plot using these variables. And if I want to create a new calculated field like ratio of Interest to Principal I don't know how to move on further :/
            – BruceBee
            Nov 12 at 0:50
















          Thanks very much! But if original measures were gone after pivoting. For instance if I still want to plot a bar chart occupation vs Principal sum how to get data from Principal only?
          – BruceBee
          Nov 10 at 14:35




          Thanks very much! But if original measures were gone after pivoting. For instance if I still want to plot a bar chart occupation vs Principal sum how to get data from Principal only?
          – BruceBee
          Nov 10 at 14:35












          @BruceBee, use Pivot Field Names and apply a filter(Only include Principal)
          – Jose Cherian
          Nov 10 at 23:52




          @BruceBee, use Pivot Field Names and apply a filter(Only include Principal)
          – Jose Cherian
          Nov 10 at 23:52












          Yea thanks I think could only do it like this but not quite convenient that I need to rename axis in every plot using these variables. And if I want to create a new calculated field like ratio of Interest to Principal I don't know how to move on further :/
          – BruceBee
          Nov 12 at 0:50




          Yea thanks I think could only do it like this but not quite convenient that I need to rename axis in every plot using these variables. And if I want to create a new calculated field like ratio of Interest to Principal I don't know how to move on further :/
          – BruceBee
          Nov 12 at 0:50












          up vote
          0
          down vote













          One approach that avoids reshaping your data is to use the measure names and measure values placeholder fields to create the stacked bar chart.



          See below
          enter image description here






          share|improve this answer





















          • sorry but it doesn't seem to be a very good idea since I do need a side-by-side bar chart.
            – BruceBee
            Nov 12 at 0:51










          • Then you need only choose “dual axis” for the second measure on the Columns shelf, and then put Measure Names on rows - should also synchronize axes.
            – Alex Blakemore
            Nov 12 at 16:10

















          up vote
          0
          down vote













          One approach that avoids reshaping your data is to use the measure names and measure values placeholder fields to create the stacked bar chart.



          See below
          enter image description here






          share|improve this answer





















          • sorry but it doesn't seem to be a very good idea since I do need a side-by-side bar chart.
            – BruceBee
            Nov 12 at 0:51










          • Then you need only choose “dual axis” for the second measure on the Columns shelf, and then put Measure Names on rows - should also synchronize axes.
            – Alex Blakemore
            Nov 12 at 16:10















          up vote
          0
          down vote










          up vote
          0
          down vote









          One approach that avoids reshaping your data is to use the measure names and measure values placeholder fields to create the stacked bar chart.



          See below
          enter image description here






          share|improve this answer












          One approach that avoids reshaping your data is to use the measure names and measure values placeholder fields to create the stacked bar chart.



          See below
          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 10 at 6:23









          Alex Blakemore

          8,13421840




          8,13421840












          • sorry but it doesn't seem to be a very good idea since I do need a side-by-side bar chart.
            – BruceBee
            Nov 12 at 0:51










          • Then you need only choose “dual axis” for the second measure on the Columns shelf, and then put Measure Names on rows - should also synchronize axes.
            – Alex Blakemore
            Nov 12 at 16:10




















          • sorry but it doesn't seem to be a very good idea since I do need a side-by-side bar chart.
            – BruceBee
            Nov 12 at 0:51










          • Then you need only choose “dual axis” for the second measure on the Columns shelf, and then put Measure Names on rows - should also synchronize axes.
            – Alex Blakemore
            Nov 12 at 16:10


















          sorry but it doesn't seem to be a very good idea since I do need a side-by-side bar chart.
          – BruceBee
          Nov 12 at 0:51




          sorry but it doesn't seem to be a very good idea since I do need a side-by-side bar chart.
          – BruceBee
          Nov 12 at 0:51












          Then you need only choose “dual axis” for the second measure on the Columns shelf, and then put Measure Names on rows - should also synchronize axes.
          – Alex Blakemore
          Nov 12 at 16:10






          Then you need only choose “dual axis” for the second measure on the Columns shelf, and then put Measure Names on rows - should also synchronize axes.
          – Alex Blakemore
          Nov 12 at 16:10




















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53229495%2ftableau-stacked-and-side-by-side-bar-chart-on-column-aggregation%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Schultheiß

          Liste der Kulturdenkmale in Wilsdruff

          Android Play Services Check