4 Replies Latest reply on Aug 10, 2018 5:38 AM by Rob Shepherd

    Multiple input, Multiple output visualisation

    Rob Shepherd

      Hi I am looking for tips and advice on how to visualise data that that multiple inputs and multiple outputs.

       

      I'll explain this idea quickly.

       

      In a manufacturing production run of a number of batches, each batch has a quanitity of inputs, incredients, raw materials etc, and these produce multiple types of output.

       

      Here's an example:

       

      Batch: 101

      Inputs.

      • Nuts: 10kg
      • Bolts: 10kg
      • Magic Beans: 7kg

      Outputs.

      • Unicorns: 20kg
      • Pizza cutters: 300kg

       

      I need to show an overview of "${period}" listing the batches and the input/output figures.

       

      Ideally, the output would look like this:

       

      Input
      Input Weight (kg)
      Batch
      OutputsOutput Weight (kg)
      Nut10101Unicorn20
      Bolt10Pizza Cutter300
      Magic Bean7
      total weight in: 27kgtotal weight out: 320kg

       

      (Don't worry that the things don't make sense, it is an overly simplistic example, but just shows these 3 main dataset dimensions)

       

      I realise that this is not how relational data is not derived naturally but I'm hoping that Tableau can do some backflips for me, or that somebody might have some examples of this kind of tabular organisation.

       

      I may need to resort to a text-level concatenation on either side

       

      Input
      Batch
      OutputsOutput Weight (kg)
      Nuts (10kg), Bolts (10kg), Magic Beans (7kg) total: 27kg101Unicorn20
      Pizza Cutter300
      total weight out: 320kg

       

      Input
      Input Weight (kg)
      Batch
      Outputs
      Nut10101Unicorn (20kg), Pizza Cutter (300kg), total 320kg
      Bolt10
      Magic Bean7
      total weight in: 27kg

       

      Or even this, if I can get tableau to display <CR><LF> somehow?

       

      Input
      Batch
      Output

      Nuts (10kg)

      Bolts (10kg)

      Magic Beans (7kg)

      total: 27kg

      101

      Unicorn (20kg)

      Pizza Cutter (300kg)

      total 320kg

       

      As a tableau newbie, I'd appreciate some tips on how to organise this type of thing.  

       

      I'm flexible on how to prepare the data and how to get it into tableau. (I could even provide the inputs/outputs in array form if that works?)

       

      I've already found I get "*" if I use data blending as an ATTR label - which is of no use and so need to make something workable.

       

      Thanks

       

      Rob

        • 1. Re: Multiple input, Multiple output visualisation
          Tim Dines

          I do not understand what the data looks like when you get it.  Which picture shows how things start out?  If you are getting a string of text that is delimited in some way, we can make it do anything.  Can you post a copy here for Forum readers to work with?

          • 2. Re: Multiple input, Multiple output visualisation
            Rob Shepherd

            Thank you Tim,

             

            Example above would be three tables as follows:

             

            Table: Batches

            BATCH_IDDate
            1012018-08-01 10:00:00
            1022018-08-01 10:30:00

             

            Table: Inputs

            BATCH_REF
            INPUT
            WEIGHT
            101Nut10
            101Bolt10
            101Magic Bean7
            102Nut20
            102Bolt18
            102Baked Bean14

             

            Table: Outputs

            BATCH_REF
            OUTPUT
            WEIGHT
            101Unicorn20
            101Pizza Cutter300
            102Apple iPhone 84
            102Lollipop Sticks700

             

            In reality I have to jump through a number of hoops in SQL to get it into this kind of form.

            But, I could also derive many other kinds of SQL output as required.

             

            The bit i'm struggling with is how to represent this as required in Tableau.

             

            Thanks again. 

            • 3. Re: Multiple input, Multiple output visualisation
              Tim Dines

              Can you just do a WITH statement and  LEFT JOINs to get it all into one?

               

              Sent from the iPhone of Timothy Dines.

              • 4. Re: Multiple input, Multiple output visualisation
                Rob Shepherd

                Yes, this will be the cartesian long form of the dataset. I can do this.

                 

                But how in tableau can I create the tabular view that I illustrated first?

                 

                Input

                Input Weight (kg)

                Batch

                Outputs

                Output Weight (kg)

                Nut10101Unicorn20
                Bolt10Pizza Cutter300
                Magic Bean7
                total weight in: 27kgtotal weight out: 320kg

                 

                The closest I can get to by using the cartesian long form is

                 

                 

                so of course, I don't get any of the benefit of row totals etc.

                 

                Attached is my excel for this example, but for anybody reading this, I'm not 100% fixed to this input format - I can be flexible with SQL queries, joins and blending to achieve my desired output.