3 Replies Latest reply on Aug 2, 2016 1:18 AM by Carl Slifer

    How do fixed table calculation to Dimension?

    Daveon Liu

      Hi guys, I'm trying to fixed table calculation to a dimension. Tried a couple of ways but didn't work.

       

      Original Data is like this:

       

      To get cumulative figures, I used table calculations

       


      Target output is a line which is quite close but I cant swap the horizontal axis from  left to right with "0+" , " 1+" , "2+" instead of "8" first

      Because it depends on table calculation I can't swap the axis at will. Any idea what did I do wrong or perharps a better way to do it?

       

      Cant upload workbook due to company confidential info. sorry!

       

        • 1. Re: How do fixed table calculation to Dimension?
          Carl Slifer

          Howdy Daveon,

           

          Seems like you just have a sort that doesn't need to be there. If you look at the 'No. of Processes' in your columns shelf and you see the tiny bar chart. That's a visual indicator to let you know that you are sorting. And in this case you are sorting the field in descending order alphabetically or in data source order descending I imagine. The default sort order (data source order) for a string is alpha numeric in ascending order. 0 - 9 and a- z.

           

          However there are a few things that we can also chat about here. The horizontal axis is not actually an axis rather it is a collection of headers. This is because your field 'No of Process' is blue. Blue is discrete (there is a finite number of options) and contains demographic like fields that can be sorted, split data, group/partition by etc. A green field is what will form an axis.

           

          If you right click your field and 'No of Processes' and choose clear sort things should work for you. You could also say data source order ascending as a sort option and that should work as well. Finally if you really wanted to set it you could create another calculation that was based on the number 0, 1, 2, 3, etc. Right now 0+ and 2+ and so on are not numbers they are strings. We would be creating a calculation that looks at the value 0-8 instead of looking at the and then because it is a number we could then choose the order of our table calculation dynamically based on them.

           

          The easy way out of this looks like just removing the sort option on your graph. Right Click, clear sort, enjoy.

           

          Best Regards,

          Carl Slifer

          InterWorks

          • 2. Re: How do fixed table calculation to Dimension?
            Daveon Liu

            Hello Carl,

             

            I appreciate the detailed explanation, unfortunately it is not so straight forward (change sorting doesn't work). This is because to get cumulative figures I used table calculation and table calculation is dependant on the sorting.

             

            This what I trying to achieve:

            "0+" should be showing 100%, "1+" 98% etc..

             

             

            or perhaps I should use tableau calculated field to reclassify the patient into "0+", "1+", "2" first?

            1 of 1 people found this helpful
            • 3. Re: How do fixed table calculation to Dimension?
              Carl Slifer

              Hi Daveon,

               

              I don't know why changing the sorting doesn't work. When I change sorting I get 0 to start with. I'm unsure what your exact raw data may look like and there could  be trailing or leading spaces that might be screwing with it. Once you get the headers (0+-8)  in the right order on the graph you need the calculation to run in the proper order:

              First make a new calculation called 'True Number'

              INT(LEFT([No. of Process],1)) is the calculation I used

               

              Then where you can edit a table calculation (I see you've brought up that window before) instead of table across you need to go into the advanced mode and change it to this. The reason being is that the % of total and running total need to start from the end of the graph and work there way to the left. To be at 100% you need to have have finished the running total, etc.

               

              Hope this helps,

              Carl Slifer

              InterWorks

              1 of 1 people found this helpful