Gaps or Sequence Check

Hi, I would like to check the gaps or sequence of the invoice numbers or purchase orders. For example, my dataset ranges from 1 to 100. I want to identify any missing numbers in between. This will help in auditing to verify the completeness of the invoices or POs.

Hi @Muzeeb

Are your orders always numeric or also alphanumeric? In case of the former, you can look at a left or right anti-join (depending on what you prefer).

In it’s most basic form:

Assume I have these po’s:


Create the numeric range that you want to verify the orders againt. This component does the trick very quickly.

Then join the two flows together and perform an anti-join.

Final result:

As such, the missing orders are 0, 4, 5 and 8. Your actual case is perhaps more complex but this should get you in the right direction.


Thank you. I have tested and verified the completeness of the invoices or purchase orders.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.