7 Replies Latest reply on Oct 3, 2016 3:20 AM by Belinda Coughlan

    Create an extra column as a dimension to count

    Belinda Coughlan

      Good afternoon,

      I have tried looking everywhere and cannot seem to find a solution.  

      I want to add an extra column after Year which shows a count of the number of surveys completed.   I can't seem to do this without affecting the whole chart layout.  

      To me it should be quite simple??? Am I looking at it all wrong?  The current layout is what is required, so it cannot be changed.   Just wanting to add that one extra column! 

      Any help would be appreciated.    I've attached the packaged workbook, where you can see I've created an extra sheet for the count, but this is not what I want.  I would like it to be included in this one.

       

      Many thanks,

      Belinda

       

        • 1. Re: Create an extra column as a dimension to count
          ra.sae.0

          HI Belinda,

           

          Please create a calculated field and use it as a Discrete Measure near Year.

           

           

          { FIXED [School],[Survey],[Question],[Year] :

          sum([Number of Records])

          }

           

          Let us know if this helps.

          • 2. Re: Create an extra column as a dimension to count
            Belinda Coughlan

            I can't reply via the message on Tableau Community? *No actions available. *

             

            This did not work and I have already tried this as per the workbook I

            attached.

             

            This is what happens

             

             

            I need to keep the formatting of the table as it was originally as below

            and add field after Year that displays the number of total surveys for that

            "survey".

            Many thanks,

            Belinda

             

             

             

             

             

             

             

             

             

             

             

             

             

            On 30 September 2016 at 20:36, Tableau Rasa <tableaucommunity@tableau.com>

            • 3. Re: Create an extra column as a dimension to count
              Andrew Watson

              These situations are always a little complex. The formula for your calculated field can be WINDOW_SUM(SUM([Number of Records])). Drag that to your Rows shelf and set it as a Discrete measure (right click the pill - Discrete - it'll turn blue). Then you can drag it into the position you want.

               

              In all probabilty it'll split the bars just as you don't want. This is where it gets a little tricky and as I don't have Tableau on this machine I can't give you the exact solution but I can guide you on what to do. Right click on the new blue pill and 'Edit Table Calculation' (or Compute Using - Advanced. I forget which it'll have but you need to get to the advanced). Once you are in the advanced section you need to get it to ignore the dimension you're using in the colours shelf.

               

              As I don't have Tableau and don't know what version you're using I can only recommend trying different combinations of the Advanced. You'll see how to alter this setting impacts the numbers returned - but one you have it right the bar will be back as you expect the the count will be correct alongside the bar.

              1 of 1 people found this helpful
              • 4. Re: Create an extra column as a dimension to count
                Deepak Rai

                Hi Blenda,

                I think this is what you need.

                Steps are as follows;

                • Create a new field "Placeholder" with MIN(0)

                • Create another duplicate of it , drag it to Columns too and check dual axis for second copy of Placeholder.
                • In the marks card select the AGG (Placeholder) (2)  and drag Number of Records to Label.
                • In the rows make duplicates of all the fields and remove the SHOW Header Check mark from all of them. All the Rows will fall in place.
                • and That's it.

                The workbook is attached. Hope it Helps

                Thanks

                Deepak

                • 5. Re: Create an extra column as a dimension to count
                  Deepak Rai

                  Hi Belinda,

                  One more thing..You can put the Title as follows:

                  • Right Click Blank Space above Count
                  • Click Edit Axis
                  • In Title put Count and Format as per need

                  Thanks

                  Deepak

                  • 6. Re: Create an extra column as a dimension to count
                    Belinda Coughlan

                    Thanks Deepak,

                    I've tried to re-create using your steps but it hasn't worked out for me as

                    it did for you.  I think there is a step missing?

                     

                    Anyway, I decided to try your workbook.

                    Unfortunately this is not the solution I was hoping for.  I really need to

                    keep my original layout.  This changes the way the questions are displayed

                    in the years etc.

                     

                    Sometimes I love Tableau, and other times it drives me crazy!  I would have

                    thought this could be so simple.

                     

                    Thanks anyway,

                     

                    Regards,

                    Belinda

                    • 7. Re: Create an extra column as a dimension to count
                      Belinda Coughlan

                      Andrew,

                      Thank you!!!   Your solution worked great! 

                       

                      So happy right now    you've made my day!

                       

                      Kind Regards,

                      Belinda