About EasyMorph Tutorials & Examples Web-help

Generate missing rows

I hope I can explain this well. I am creating a histogram for the lead-time (LT) to complete production for each material code (the table is 140,000 rows of data). In the illustration,EasyMorph1 the first product - 100000002 - I have 7 histogram bins covering 3 values (1st is 6 days to 9 days, 2nd is 9 days to 12 days etc.) I have values in every bin except bin 6 (21 days to 24 days). Because of this I have no entry for bin 6. Is there any of Easymorph’s actions that would enable me to create a row for bin 6 (with zero entries)… I need it for subsequent processes? Any suggestions welcome

To insert missing values the algorithm is usually as follows:

  1. Generate all possible combinations
  2. Remove combinations that already exist in the source data
  3. Merge the remaining (missing) combinations into the source data

In your case we’re looking at combinations of [Material Number] and [Bin#]. All possible combinations are typically generated using the “Cross-merge” action. Removing existing combinations can be done using the “Keep mismatching” action.

See example below:
merge-missing.morph (5.7 KB)
data.xlsx (7.9 KB)

The example assumes that every [Material Number] has the same number of bins (i.e. 7), which I suspect is not exactly the case.

You may need to additionally merge the number of bins [Lt_BinCnt] per [Material Number] and filter out all the records where [Bin#] > [Lt_BinCnt]

Let me know if you need help with this.

Many thanks - works well.

To learn more about EasyMorph visit easymorph.com.