JCs: IDMS_JC all JobCards that are Won and have CreateDateTime in between now and start of the year before today (01/01/2021).
CCs: IDMS_JC_CC which have CreateDateTime in between now and start of the year before today (01/01/2021) and their JCCode exists in the JCs 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).
- JCsASRGrossTotalAmountCurrent: from the the CCs above, we keep the entries that have as JCCode the codes in JCsCurrent, the U_IDMS_Source == AfterReception or VHC and we sum the GrossTotalAmount.
- JCsASRGrossTotalAmountPrevious: from the the CCs above, we keep the entries that have as JCCode the codes in JCsPrevious, the U_IDMS_Source == AfterReception or VHC and we sum the GrossTotalAmount.
Calculations
- CurrentRate: If JCsCurrent count > 0 then JCsASRGrossTotalAmountCurrent count / JCsCurrent count.
- PreviousRate: If JCsPrevious count > 0 then JCsASRGrossTotalAmountPrevious count / JCsPrevious
- PercentageChange: If the PreviousRate is > 0 then (CurrentRate – PreviousRate) / PreviousRate.
0 Comments