5 Replies Latest reply on Aug 6, 2017 4:27 PM by mara.quindoza

    How do i combine the charts together (note: days for each is different i.e. osday, yday, nday etc

    robinson liu

      dear community,

       

      Attached is my tableau.

      I have a dataset with osdate from 9th July to 31st July (printed on 24th July)

       

      1. ws - orders to do - 481, based on osday (days in the month of July)

      2. ws - orders already done - 340, based on y-day

      3. ws - orders yet to be done - 99, based on n-day

      4. ws - orders cancelled, based on c-day

       

      I have trying to combine these ws content, see attached image

       

      Can't get it to work.jpg

       

      Question

      1. How do i combine the charts together (note: days for each is different i.e. osday, yday, nday etc

          Since I extracted the dataset e.g. on 24th July, Orders already done of 340 orders should be

          on day 24 instead of 31. Same situation for 99 and 42.

      2. Once the above can be done, I would like to have a reference line or coloring, if I were to

          run this tableau on 30th July or day 30, that it is 80% completed

       

      Thanks in advance

       

      I attached tableau file (v 10.3.1 64-bit

       

      rgds,

      robinson

      p/s: new to the forum

        • 1. Re: How do i combine the charts together (note: days for each is different i.e. osday, yday, nday etc
          mara.quindoza

          Hello robinson liu,

           

          To be able to combine them in a single chart, you can make use of the "Measure Values".

           

          Below are the steps I did:

          1. I created a new calculated field to return the Count of Order Number. Order Number is supposedly a dimension field and not a measure field as it identifies or tags each row in the dataset. I will also explain another reason later.

           

          The field is called Count of Order Number and the formula is:

           

          {fixed [Osday]:COUNT([OrderNo])} which is an LOD expression calculating the count of order no per OSday.

           

          2. Once done, I drag the count of order number in the view and it will be aggregated as a SUM.

           

          3. Next, I drag the Measure Names as a Filter and selected only the last three fields.

          4. I then added the measure values in the rows shelf and added quick table calculations on the three fields.

           

           

           

          5. Once done, I right clicked on Measure Values and selected Dual Axis. It will now combine them in a single chart. However, as we can see below, the axes are not in sync.

           

           

          6. To synchronize them, we have to ensure that the data type of the field not included in the measure values is number (decimal). The reason is "Measure values are interpreted as a float data type, regardless of the data types of the underlying fields. Float and integer data types cannot be synchronized." (Unable to Synchronize Axis When Using Measure Value As an Axis | Tableau Software )

           

          To change it to number (decimal), right click on the count of order number > Change Data Type > Number (decimal). This is why we can't just use the Order No field.

           

          7. You should then be able to synchronize the two charts. I also changed the Osday to continuous so you can add a reference line.

           

           

           

          Hope this helps. Thank you!

          • 2. Re: How do i combine the charts together (note: days for each is different i.e. osday, yday, nday etc
            robinson liu

            thanks quindoza for spending the efforts to work on my query.

             

            I followed your steps, but strange that it is not showing per your png screenshots. It should!

             

             

            2. I noticed your osday is green and not blue (dimension). Is this correct?

             

            3. The running totals is still not what I am expecting.

                e.g. zz-cf-y i.e. 340, should be at week 27 and not week 31

                e.g. zz-cf-c i.e. 42, should be at week 24 and not week 31.

             

            rgds,

            robinson

            • 3. Re: How do i combine the charts together (note: days for each is different i.e. osday, yday, nday etc
              mara.quindoza

              Hello robinson liu,

               

              I see.

               

              1. For your chart, since the 2nd chart is based on the measure values, the three measures are aggregated together. You need to drop the Measure Names as a Color or Detail so separate lines will be created for each measure name.

              2. Green means it's a continuous field. It doesn't matter whether OsDay is continuous or discrete. But if you are going to add a reference line, the field should be continuous.

              3. For that, in your separate sheets, zz-cf-y is based on the yday when it returned 340 on week 27 and not the Osday.

              I think my question is: Should yday and Osday be the same? Or are they different? Same goes with the other fields you are currently using in lieu of Osday for the other measures in the separate sheets

               

              thanks!

              • 4. Re: How do i combine the charts together (note: days for each is different i.e. osday, yday, nday etc
                robinson liu

                hi quindoza,

                 

                Really thank you for your looking into this and quick response.

                 

                I managed to get the result per your screenshot

                 

                 

                Here's my reply to your Q

                 

                1. For your chart, since the 2nd chart is based on the measure values, the three measures are aggregated together. You need to drop the Measure Names as a Color or Detail so separate lines will be created for each measure name.

                    Got it!

                2. Green means it's a continuous field. It doesn't matter whether OsDay is continuous or discrete. But if you are going to add a reference line, the field should be continuous.

                    Got it!

                3. For that, in your separate sheets, zz-cf-y is based on the yday when it returned 340 on week 27 and not the Osday.

                I think my question is: Should yday and Osday be the same? Or are they different? Same goes with the other fields you are currently using in lieu of Osday for the other measures in the separate sheets

                 

                  

                     For Q3, if you look at the above table, order no 25069, the expected week to processed it is by week 26,

                     In actual fact, it was completed in week 17.

                     In the case of order 28160, expected week to process it is by week 17. For whatever reason, it

                     was decided not to process it and there it is n and also cancelled in week 15.

                 

                     If you look at the dataset, y-day has max week of 27, therefore, 340 should end in week 27

                 

                    Hope the above helps.

                 

                    many thanks! 

                • 5. Re: How do i combine the charts together (note: days for each is different i.e. osday, yday, nday etc
                  mara.quindoza

                  Sorry for the late response!

                   

                  I see, I understand. However, we can only use one field in the rows unless we have a standardized period field.

                  One thing that I can see though is for Osday, period 9 for example has various n-day field values involved.