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

JCLabors: IDMS_JC_Labor where U_IDMS_CreateDateTime in between now and start of the year before today (01/01/2021) and the CCCode exists in the JCs selected above.

  • 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).
  • JCLaborsUnitPriceCurrent: from the JCLabors we keep the ones that their CCCode exists in the JCsCurrent above and we sum their unit price considering their Price Source.
  • JCLaborsUnitPricePrevious: from the JCLabors we keep the ones that their CCCode exists in the JCsPrevious above and we sum their unit price considering their Price Source.

Calculations

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