Skip to main content
Question

Count Cases which are just in one table

  • August 7, 2020
  • 1 reply
  • 0 views

Hey all, I want to count cases where an article number is just present in one table but not in the other example TableV1 ArtNr 1 3 4 5 7 9 TableV2 1 2 3 4 5 6 7 8 9 10 Count cases which are in TableV2 but not in TableV1 (Null). In that case 2, 6, 8, 10 -> Count = 4 Thx and br Daniel

1 reply

  • Level 0
  • 68 replies
  • September 8, 2020
Dear Daniel, thanks for reaching out to the Celonis Community Forum! Try using the formula: SUM(CASE WHEN ISNULL(TableV2.ArtNr)=0 AND ISNULL(TableV1.ArtNr)=1 THEN 1.0 ELSE 0.0 END) This works as soon as there is a common primary key in both tables. Feel free to follow up with any additional questions. Best regards, your Celonis Community Forum Team