2 Replies Latest reply: Nov 28, 2011 11:53 AM by Stefan Wühl RSS

    Same Part in different location

      Test:

      LOAD * INLINE [

          pn, slc

          a, 1

          a, 1

          a, 2

          b, 3

          b, 3

          c, 4

          c, 5

      ];

       

      Refer to pn as a Part Number and to slc as Store Location.

       

      Question is: Do we have Part Numbers in different location?

       

      This is true for a and c.

       

      Any sugestions?

        • Re: Same Part in different location
          Miguel Angel Baeyens de Arce

          Hi Thomas,

           

          This is the idea. This will work provided all values in "pn" and "slc" are ordered. If they are not, do a second resident load of the "Test" table using ORDER BY.

           

          Test:
          LOAD *, If(pn = Previous(pn), If(slc = Previous(slc), 0, 1), 0) AS DifferentLocations, RowNo() AS LineNo INLINE [
              pn, slc
              a, 1
              a, 1
              a, 2
              b, 3
              b, 3
              c, 4
              c, 5
          ]; 
          

           

          That will only store "1" when the "slc" is different within the same "pn". You can now easily draw a chart showing what "pn" have different locations.

           

          Hope that helps.

           

          Miguel

          • Same Part in different location
            Stefan Wühl

            Maybe you could just create a straight table chart with dimension pn, and

             

            =if(count( distinct slc) >1, 1, 0)

             

            as expression. If supress zero values is enabled in presentation tab, only the pn with 1 (true) will be shown.

            Probably not the most performant solution though.