JCs: IDMS_JC all JobCards that are Open or Won and have CreateDateTime in between now and start of the year before today (01/01/2021).

JCsVHCPerformed: we take all the IDMS_JC_VHCLine with U_IDMS_CreateDateTime in between now and start of the year before today (01/01/2021) and then we check if in the IDMS_JC_VHCLine the codes from JCs above exist.

  • JCsCurrent: from the JCs above we keep the entries with CreateDate in the selected time frame (YTD, QTD, MTD).
  • JCsPrevious: from the JCs above we keep the entries with CreateDate in the time frame (PYTD, PQTD, PMTD).
  • JCsVHCPerformedCurrent: from the JCsCurrent we check if the count of JCsVHCPerformed is > 0.
  • JCsVHCPerformedPrevious: from the JCsPrevious we check if the count of JCsVHCPerformed is > 0.

Calculations

  • CurrentRate: If JCsCurrent count > 0 and JCsVHCPerformedCurrent count > 0 then JCsVHCPerformedCurrent count / JCsCurrent count.
  • PreviousRate: If JCsPrevious count > 0 and JCsVHCPerformedPrevious count > 0 then JCsVHCPerformedPrevious count / JCsPrevious
  • PercentageChange: If the PreviousRate is > 0 then (CurrentRate – PreviousRate) / PreviousRate.
  • No labels
Write a comment…