8 Replies Latest reply on Apr 9, 2018 8:06 AM by Jim Horbury

    Count of occurrences in a scatterplot.

    harald.solhaug

      Hi,

      First time poster here.

       

      I have a scatterplot that I want to modify. The plot shows "Setups", and how much each of these have produced, with a timeline on the X axis.

      Each Setup contains "Partnumbers", which are repeated for 3-4 Setups. (That is, different Setups may contain the same Parts, as the Parts are re-used). A Setup is only used once.

       

      I want to show in my scatterplot if this is the first, second, or third time a Partnumber has been used in a Setup. I want to, for instance, color code the Setups, so that all the Blue Setups contain Parts that have never been used before, while all the Red Setup contains parts that are being used for the second time.

      Does anyone know how to achieve this?

       

      Thanks for any help!

        • 1. Re: Count of occurrences in a scatterplot.
          Tushar  More

          Hi Harald,

           

          Please post .twbx file.

          • 2. Re: Count of occurrences in a scatterplot.
            harald.solhaug

            Hi,

            I would prefer to not share this data.

            However, here is an image showing the scatterplot. Each dot is a Setup, and by hovering my mouse over it I can see what Parts it contains.

            I hope this makes it clearer. Thanks for your help!

            Untitled.png

            • 3. Re: Count of occurrences in a scatterplot.
              Tushar  More

              I am sorry. Not able to understand anything from the image.

              • 4. Re: Count of occurrences in a scatterplot.
                Jim Horbury

                I'm making an assumption about your requirment as it's difficult to understand without an example file.

                 

                Do you have anything in the data that can be used to determine the "status" of a given part - ie, the number of time it's been used? Or is this purely determined by the date? If it's the former, it would be straightforward to create a calculated field for status, and drag that to the colour shelf to colour-code your view. If the latter, then it's potentially more complex as you'd need to create a calculation that determines the status from date, possibly at the "setup" level of detail - this may require LOD expressions, etc.

                 

                Could your perhaps supply a sample of data that's structured in the same way but doesn't contain any confidential info?

                • 5. Re: Count of occurrences in a scatterplot.
                  harald.solhaug

                  Hi, thank you,

                  There is nothing to determine the status of a part, this can only be determined by date, or by order of occurrence

                  I've added a table here of what the data looks like in the database.

                  As you can see, Setup 582, 599, and 603 all contain the same Parts (there are several more Parts per Setup).

                  The scatter plot shows how much each Setup has produced.

                  I'm gonna need to color code this so that I can see that Setups 582, 625, 687 etc all contain brand new parts that have not been part of an earlier Setup. Similarly, Setups with parts that are used for the second time, should have a different color.

                  Thanks again!

                     

                      

                  PartsSetupsDateProduced
                  14015822018-01-01235 000
                  14015992018-01-03365 000
                  14016032018-01-06268 000
                  14026252018-01-12214 000
                  14026482018-01-18329 000
                  14036872018-01-24319 000
                  14037092018-01-30267 000
                  14037282018-02-05331 000
                  14047512018-02-11297 000
                  14047722018-02-17263 000
                  14047962018-02-23342 000
                  • 6. Re: Count of occurrences in a scatterplot.
                    Jim Horbury

                    Determining if the part has been used before based on the date is fairly straightforward (see attached). If you need to determine if it's specifically the second, third or nth time that's a bit trickier. Have a look at the attached - does that get you anywhere?

                    • 7. Re: Count of occurrences in a scatterplot.
                      harald.solhaug

                      Thank you!

                      This helps a lot! I modified the graph a bit, and the attached image shows basically what I want.

                      It would be great to display different colors for the n'th time a part is used. I think this would require a different approach to solving the problem though.

                      But this is still a good start and will be useful on its own.

                       

                      Capture.PNG

                      • 8. Re: Count of occurrences in a scatterplot.
                        Jim Horbury

                        No problem, glad to help. I guess the n'th challenge could be achieved by nesting LODs - in a sense, the min of the False set would be the second, the min of that the third, etc. to as many levels as you need.