Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
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
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.