6 Replies Latest reply on Aug 14, 2019 2:24 PM by Hari Ankem

    Multiple Dual Axis?

    Jordan Daleo

      I'm trying to combine two measures together to a single bar (that goes above and below 0), one is a negative value, one is positive (gray bars).

       

      If i only have one Measure in the row, and i drag the second (with the negative value) to the right side, it'll do what i want in a dual axis, but i can't do that for two sets of measures with other measures added as well.

       

      Any ideas? I'm fairly new to Tableau, so i'm sure there are many things that i'm missing here.

       

      All measures showing.

       

      Only two measures, i can do it. It'll place both the negative and positive in a single bar.

       

      I can even make two graphs correctly show the pos and neg in a single bar,  but they're two separate graphs.

       

      Adding the rest of the measures make all different charts.. I would like them all combined how they are now (with the gray and green combined, both pos and neg), as shown in the first image.

        • 1. Re: Multiple Dual Axis?
          Chris McClellan

          Firstly, I love looking at solar/battery data - I've spent a lot of time looking at my own data to manage my usage and save money

           

          Secondly, can you provide the data that you're using (even if it's just a sample or dummy values so that we can play with it)

           

          Finally, I think what you're trying to say is ..... the first graph has 6 bars clustered together (3 positive values and 3 negative values), which means you only want 3 bars (that each start from a negative value and go to a positive value).  This starts to feel more like a Gantt Bar chart rather than a (normal/plain) Bar because a plain bar graph will start at 0 and mark to the value (I know you've done it differently, but it's still 2 measures coloured the same to simulate a single bar).

           

          Bottom line is that in a dual axis you can do just that - two axes only, and you've already discovered when you use Measure Names/Measure Values you can't do different combinations on each axes.

           

          But please supply some sample/dummy data and we'll see what can be done.

          • 2. Re: Multiple Dual Axis?
            Jordan Daleo

            Chris McClellan,

             

            Sure thing! I really appreciate any help you can provide! I'm doing the same, as i see the wrong bars go up, i watch a little more closely to what's running at my house!

             

            Below is my data from March (when i had some actual Powerwall activity).

             

            Some background:

            I download: "Date time", "Home Usage", "Solar Energy", "From Powerwall", "From Grid" and "To Grid".

            I create: "Date" (based on Date Time), "To Powerwall" (since this data is not yet available to download, it's simply a calculation from the other fields), and "ToGridNeg" (which is just To Grid, but in the negative, so i could get it on the same bar as From Grid. Therefore "To Grid" is not used). Currently I made a calculated field in Tableau for "ToGridNeg", but i think i'm going to have it calculated in Excel so all of the data is coming into Tableau clean and unaltered.

             

            "Home Usage" is always positive and on it's own.

            "Solar Energy" is always positive and on it's own.

            "From Powerwall" is always positive, "To Powerwall" is always negative and both should be on a single bar.

            "From Grid" is always positive, "ToGrigNeg" is always negative and both should be on a single bar.

             

            So i'm looking for 4 total bars, Usage, Solar, Powerwall and Grid to mimic the image below.

             

            I wish i could save the twbx file, but since i'm using the free public version, i don't think i can.

             

            This is how the data looks with Tesla in the app, that i'm trying to duplicate so i can build it out and see all of my data in one shot.

             

             

             

                    

            Date timeHome Usage (kWh)Solar Energy (kWh)From Powerwall (kWh)From Grid (kWh)To Grid (kWh)DateTo Powerwall (kWh)ToGridNeg
            2019-03-01T01:00:00.000-05:0017.10017.203/1/2019-0.10
            2019-03-02T01:00:00.000-05:0012.87.909.23.63/2/2019-0.7-3.6
            2019-03-03T01:00:00.000-05:0013.31109.773/3/2019-0.4-7
            2019-03-04T01:00:00.000-05:0017.317.7011.511.43/4/2019-0.5-11.4
            2019-03-05T01:00:00.000-05:00173109.823.33/5/2019-0.5-23.3
            2019-03-06T01:00:00.000-05:001724.809.616.63/6/2019-0.8-16.6
            2019-03-07T01:00:00.000-05:0016.219.80912.43/7/2019-0.2-12.4
            2019-03-08T01:00:00.000-05:0014.518.807.511.53/8/2019-0.3-11.5
            2019-03-09T01:00:00.000-05:001328.90823.43/9/2019-0.5-23.4
            2019-03-10T01:00:00.000-05:0015.44.8011.90.93/10/2019-0.4-0.9
            2019-03-11T01:00:00.000-04:0013.424.608.318.83/11/2019-0.7-18.8
            2019-03-12T01:00:00.000-04:0013.732.606.825.43/12/2019-0.3-25.4
            2019-03-13T01:00:00.000-04:0023.127.6012.216.83/13/20190.1-16.8
            2019-03-14T01:00:00.000-04:0014.226.207.719.33/14/2019-0.4-19.3
            2019-03-15T01:00:00.000-04:0011.1172.6311.13/15/2019-0.4-11.1
            2019-03-16T01:00:00.000-04:0011.830.76.60.119.23/16/2019-6.4-19.2
            2019-03-17T01:00:00.000-04:0013.533.27.40.118.53/17/2019-8.7-18.5
            2019-03-18T01:00:00.000-04:0016.127.58.21123/18/2019-8.6-12
            2019-03-19T01:00:00.000-04:0014337.60.117.93/19/2019-8.8-17.9
            2019-03-20T01:00:00.000-04:0010.229.53.4317.23/20/2019-8.5-17.2
            2019-03-21T01:00:00.000-04:0012.23.209.50.53/21/20190-0.5
            2019-03-22T01:00:00.000-04:0014.414.40983/22/2019-1-8
            2019-03-23T01:00:00.000-04:0012.235.306.1293/23/2019-0.2-29
            2019-03-24T01:00:00.000-04:008.734.505.330.83/24/2019-0.3-30.8
            2019-03-25T01:00:00.000-04:0012.51407.88.83/25/2019-0.5-8.8
            2019-03-26T01:00:00.000-04:0013.136.908.531.93/26/2019-0.4-31.9
            2019-03-27T01:00:00.000-04:0012.835.507.629.63/27/2019-0.7-29.6
            2019-03-28T01:00:00.000-04:0013.934.806.927.53/28/2019-0.3-27.5
            2019-03-29T01:00:00.000-04:0011.710.607.25.73/29/2019-0.4-5.7
            2019-03-30T01:00:00.000-04:00727.404.524.53/30/2019-0.4-24.5
            2019-03-31T01:00:00.000-04:009.77.205.933/31/2019-0.4-3
            • 3. Re: Multiple Dual Axis?
              Chris McClellan

              I tried a few different ways but can't make the bars work like that.

               

              Personally, I prefer lines to show the values, because some of these values shouldn't be stacked together.

               

              Hopefully someone else can help you

              • 4. Re: Multiple Dual Axis?
                Hari Ankem

                Will this work?

                1.png

                 

                If yes, then I have first pivoted the data and then created a calculated field as shown below and displaying it as the X-axis.

                1.png

                 

                A 2019.2 workbook is attached for reference.

                • 5. Re: Multiple Dual Axis?
                  Jordan Daleo

                  Chris McClellan I truly appreciate your help!

                  Hari Ankem That is exactly what i'm looking for, thank you very much! I still have a lot of formatting to do with other areas of my visualization, but this worked perfectly!

                   

                  Is there an easy way to hide one or two of the colors in the legend without hiding the whole bar in the chart? (Ex, i don't need "To Grid" and "From Grid" to both show, i could simply name one "Grid" and hide the other. Same with the Battery.)

                  • 6. Re: Multiple Dual Axis?
                    Hari Ankem

                    You can create another worksheet with the required values and show that as a legend for the current sheet on a dashboard.