Spaces:
Sleeping
Sleeping
Commit ·
3d81cbc
1
Parent(s): a803438
Upload KPI Definitions (1).txt
Browse files
documents/KPI Definitions (1).txt
ADDED
|
@@ -0,0 +1,490 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
[
|
| 3 |
+
"Definition: Get a full count of the activities table.",
|
| 4 |
+
"COUNT_TABLE(\"_CEL_AP_ACTIVITIES\")"
|
| 5 |
+
],
|
| 6 |
+
[
|
| 7 |
+
"Definition: Get a count of the number of activities with manual users.",
|
| 8 |
+
"SUM( CASE\n WHEN KPI(\"FORMULA_Activity_CLASSIFICATION_UserType\") = 'MANUAL'\n THEN 1 ELSE NULL\nEND )*1.0"
|
| 9 |
+
],
|
| 10 |
+
[
|
| 11 |
+
"Definition: Get a count of the number of activities that are not titled 'Due Date passed', 'Cash Discount Due Date passed', 'Vendor Creates Invoice', or 'Record Goods Receipt'",
|
| 12 |
+
"SUM( \n CASE\n WHEN \"_CEL_AP_ACTIVITIES\".\"ACTIVITY_EN\" NOT IN ( 'Due Date passed', 'Cash Discount Due Date passed', 'Vendor Creates Invoice', 'Record Goods Receipt')\n THEN 1 ELSE 0\n END \n)"
|
| 13 |
+
],
|
| 14 |
+
[
|
| 15 |
+
"Definition: Get a count of the activited that are automated, excluding activities titled 'Due Date passed', 'Cash Discount Due Date passed', 'Vendor Creates Invoice', 'Record Goods Receipt'",
|
| 16 |
+
"SUM( \n CASE\n WHEN KPI(\"FORMULA_Activity_CLASSIFICATION_UserType\") = 'AUTOMATED'\n AND \"_CEL_AP_ACTIVITIES\".\"ACTIVITY_EN\" NOT IN ( 'Due Date passed', 'Cash Discount Due Date passed', 'Vendor Creates Invoice', 'Record Goods Receipt')\n THEN 1 ELSE 0\n END \n)"
|
| 17 |
+
],
|
| 18 |
+
[
|
| 19 |
+
"Definition: When the BSEG.AUGDT field is not null, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 20 |
+
"COUNT(DISTINCT CASE WHEN \"BSEG\".AUGDT IS NULL THEN NULL\nELSE \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\"\nEND )\n"
|
| 21 |
+
],
|
| 22 |
+
[
|
| 23 |
+
"Definition: Count the number of distinct payment terms.",
|
| 24 |
+
"--COUNT(DISTINCT \"BSEG\".\"ZTERM\")\r\nCOUNT(DISTINCT KPI(\"payment_term_description\"))"
|
| 25 |
+
],
|
| 26 |
+
[
|
| 27 |
+
"Definition: Count the rows in the BSEG table",
|
| 28 |
+
"COUNT_TABLE(\"BSEG\")"
|
| 29 |
+
],
|
| 30 |
+
[
|
| 31 |
+
"Definition: Count the number of distinct BSEG.BUZEI fields per each item in the BKPF table.",
|
| 32 |
+
"PU_COUNT_DISTINCT(\"BKPF\", \"BSEG\".\"BUZEI\")"
|
| 33 |
+
],
|
| 34 |
+
[
|
| 35 |
+
"Definition: Count the BKPF table. ",
|
| 36 |
+
"COUNT_TABLE(\"BKPF\")"
|
| 37 |
+
],
|
| 38 |
+
[
|
| 39 |
+
"Definition: When an invoice was cleared in the preceding month, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 40 |
+
"COUNT( DISTINCT CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastMonth\") = 1\n THEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\"\n ELSE NULL END )\n"
|
| 41 |
+
],
|
| 42 |
+
[
|
| 43 |
+
"Definition: When an invoice was cleared in the preceding quarter, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 44 |
+
"COUNT( DISTINCT CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastQuarter\") = 1\n THEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\"\n ELSE NULL END )\n"
|
| 45 |
+
],
|
| 46 |
+
[
|
| 47 |
+
"Definition: When an invoice was cleared in the preceding year, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 48 |
+
"COUNT( DISTINCT CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastYear\") = 1\n THEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\"\n ELSE NULL END )\n"
|
| 49 |
+
],
|
| 50 |
+
[
|
| 51 |
+
"Definition: When an invoice was paid late, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 52 |
+
" COUNT( DISTINCT\n\n CASE WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%late%'\n\n THEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\" ELSE NULL END )\n"
|
| 53 |
+
],
|
| 54 |
+
[
|
| 55 |
+
"Definition: When an invoice was paid according to the schedule, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 56 |
+
"COUNT( DISTINCT\n\nCASE WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%schedule%'\n\nTHEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\" ELSE NULL END )\n"
|
| 57 |
+
],
|
| 58 |
+
[
|
| 59 |
+
"Definition: When an invoice was paid early or according to the schedule, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 60 |
+
"COUNT( DISTINCT\n\nCASE WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%early%' OR KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%schedule%'\n\nTHEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\" ELSE NULL END )\n"
|
| 61 |
+
],
|
| 62 |
+
[
|
| 63 |
+
"Definition: When an invoice was paid early or according to the schedule in the preceding month, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 64 |
+
"COUNT( DISTINCT CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastMonth\") = 1 THEN \n\n CASE WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%early%' OR KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%schedule%'\n\n THEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\"\n ELSE NULL END END )\n"
|
| 65 |
+
],
|
| 66 |
+
[
|
| 67 |
+
"Definition: When an invoice was paid early or according to the schedule in the preceding quarter, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 68 |
+
"COUNT( DISTINCT CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastQuarter\") = 1 THEN \n\n CASE WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%early%' OR KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%schedule%'\n\n THEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\"\n ELSE NULL END END )\n"
|
| 69 |
+
],
|
| 70 |
+
[
|
| 71 |
+
"Definition: When an invoice was paid early or according to the schedule in the preceding year, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 72 |
+
"COUNT( DISTINCT CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastYear\") = 1 THEN \n\n CASE WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%early%' OR KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%schedule%'\n\n THEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\"\n ELSE NULL END END )\n"
|
| 73 |
+
],
|
| 74 |
+
[
|
| 75 |
+
"Definition: When an invoice was paid early or according to the schedule in the current month, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 76 |
+
"COUNT( DISTINCT CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisMonth\") = 1 THEN \n\n CASE WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%early%' OR KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%schedule%'\n\n THEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\"\n ELSE NULL END END )\n"
|
| 77 |
+
],
|
| 78 |
+
[
|
| 79 |
+
"Definition: When an invoice was paid early or according to the schedule in the current quarter, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 80 |
+
"COUNT( DISTINCT CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisQuarter\") = 1 THEN \n\n CASE WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%early%' OR KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%schedule%'\n\n THEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\"\n ELSE NULL END END )\n"
|
| 81 |
+
],
|
| 82 |
+
[
|
| 83 |
+
"Definition: When an invoice was paid early or according to the schedule in the current year, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 84 |
+
"COUNT( DISTINCT CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisYear\") = 1 THEN \n\n CASE WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%early%' OR KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%schedule%'\n\n THEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\"\n ELSE NULL END END )\n"
|
| 85 |
+
],
|
| 86 |
+
[
|
| 87 |
+
"Definition: When an invoice was paid in the current month, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 88 |
+
"COUNT( DISTINCT CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisMonth\") = 1\n THEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\"\n ELSE NULL END )\n"
|
| 89 |
+
],
|
| 90 |
+
[
|
| 91 |
+
"Definition: When an invoice was paid in the current quarter, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 92 |
+
"COUNT( DISTINCT CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisQuarter\") = 1\n THEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\"\n ELSE NULL END )\n"
|
| 93 |
+
],
|
| 94 |
+
[
|
| 95 |
+
"Definition: When an invoice was paid in the current year, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 96 |
+
"COUNT( DISTINCT CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisYear\") = 1\n THEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\"\n ELSE NULL END )\n"
|
| 97 |
+
],
|
| 98 |
+
[
|
| 99 |
+
"Definition: When an invoice was paid early, concatenate the BKPF.BELNR, BKPF.BUKRS, BKPF.GJAHR, BKPF.MANDT, and BSEG.BUZEI fields.",
|
| 100 |
+
"COUNT( DISTINCT\nCASE WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%early%'\nTHEN \"BKPF\".\"BELNR\" || \"BKPF\".\"BUKRS\" || \"BKPF\".\"GJAHR\" || \"BKPF\".\"MANDT\" || \"BSEG\".\"BUZEI\" ELSE NULL END )"
|
| 101 |
+
],
|
| 102 |
+
[
|
| 103 |
+
"Definition: Divide the days_payable_outstanding_unweighted KPI by 365, then multiply it by the KPI_AccDocItem_SUM_NetValue KPI",
|
| 104 |
+
"KPI(days_payable_outstanding_unweighted_) / 365 * KPI(KPI_AccDocItem_SUM_NetValue)"
|
| 105 |
+
],
|
| 106 |
+
[
|
| 107 |
+
"Definition: Get a count of activities where the user is automated, excluding the 'Due Date passed', 'Cash Discount Due Date passed', 'Vendor Creates Invoice', 'Record Goods Receipt' activities",
|
| 108 |
+
"SUM( \n CASE\n WHEN KPI(\"FORMULA_Activity_CLASSIFICATION_UserType\") = 'AUTOMATED'\n AND \"_CEL_AP_ACTIVITIES\".\"ACTIVITY_EN\" NOT IN ( 'Due Date passed', 'Cash Discount Due Date passed', 'Vendor Creates Invoice', 'Record Goods Receipt')\n THEN 1 ELSE 0\n END \n) / SUM( \n CASE\n WHEN \"_CEL_AP_ACTIVITIES\".\"ACTIVITY_EN\" NOT IN ( 'Due Date passed', 'Cash Discount Due Date passed', 'Vendor Creates Invoice', 'Record Goods Receipt')\n THEN 1 ELSE 0\n END \n)"
|
| 109 |
+
],
|
| 110 |
+
[
|
| 111 |
+
"Definition: Get a count of the number of activities per each item in the BSEG table.",
|
| 112 |
+
"AVG(PU_COUNT(\"BSEG\", \"_CEL_AP_ACTIVITIES\".\"ACTIVITY_EN\"))"
|
| 113 |
+
],
|
| 114 |
+
[
|
| 115 |
+
"Definition: When the BKPF.BUDAT field is between the dates of 2022-01-01 and 2022-12-31, take the max payment_terms KPI for each item in the LFA1 table, then take an average of all the payment terms.",
|
| 116 |
+
"AVG(\n(CASE \n WHEN \"BKPF\".\"BUDAT\" >= TO_DATE ( '2022-01-01' , FORMAT ( '%Y-%m-%d' ) ) \n AND \"BKPF\".\"BUDAT\" <= TO_DATE ( '2022-12-31' , FORMAT ( '%Y-%m-%d' ) )\n AND PU_MAX(\"LFA1\",KPI(\"payment_terms\"))>0\n THEN PU_LAST(\"LFB1\",KPI(\"payment_terms\"))\n "
|
| 117 |
+
],
|
| 118 |
+
[
|
| 119 |
+
"Definition: Take the sum of the KPI_AccDocItem_PUCOUNT_ManualTouchesPerInvoiceItem KPI",
|
| 120 |
+
"SUM(KPI(\"KPI_AccDocItem_PUCOUNT_ManualTouchesPerInvoiceItem\"))"
|
| 121 |
+
],
|
| 122 |
+
[
|
| 123 |
+
"Definition: Take the average of the KPI_AccDocItem_PUCOUNT_ManualTouchesPerInvoiceItem KPI",
|
| 124 |
+
"AVG(KPI(\"KPI_AccDocItem_PUCOUNT_ManualTouchesPerInvoiceItem\"))"
|
| 125 |
+
],
|
| 126 |
+
[
|
| 127 |
+
"Definition: For items where the BSEG.AUGDT field is null, provide a classification for the possible cash discount, based on the last activity for each item in the BSEG table",
|
| 128 |
+
"CASE WHEN \"BSEG\".AUGDT IS NULL AND KPI(\"FORMULA_AccDocItem_VALUE_PossibleCashDiscount\") > 0.0 AND TODAY() > PU_LAST(\"BSEG\",\"_CEL_AP_ACTIVITIES\".\"EVENTTIME\",\"_CEL_AP_ACTIVITIES\".\"ACTIVITY_EN\" = 'Cash Discount Due Date passed') THEN 'open - CD due date passed' WHEN \"BSEG\".AUGDT IS NULL AND KPI(\"FORMULA_AccDocItem_VALUE_PossibleCashDiscount\") > 0.0 AND TODAY() <= PU_LAST(\"BSEG\",\"_CEL_AP_ACTIVITIES\".\"EVENTTIME\",\"_CEL_AP_ACTIVITIES\".\"ACTIVITY_EN\" = 'Cash Discount Due Date passed') THEN 'open - CD available' WHEN KPI(\"FORMULA_AccDocItem_VALUE_PossibleCashDiscount\") > 0.0 AND KPI(\"FORMULA_AccDocItem_VALUE_LostCashDiscount\") = 0.0 THEN 'CD fully gained' WHEN KPI(\"FORMULA_AccDocItem_VALUE_PossibleCashDiscount\") = KPI(\"FORMULA_AccDocItem_VALUE_LostCashDiscount\") AND KPI(\"FORMULA_AccDocItem_VALUE_PossibleCashDiscount\") != 0 THEN 'CD fully lost' WHEN KPI(\"FORMULA_AccDocItem_VALUE_PossibleCashDiscount\") > 0.0 AND KPI(\"FORMULA_AccDocItem_VALUE_LostCashDiscount\") > 0.0 THEN 'CD partially gained' ELSE 'no Cash Discount' END\n"
|
| 129 |
+
],
|
| 130 |
+
[
|
| 131 |
+
"Definition: Calculate the proportion of gained cash discounts based on the total possible volume of cash discounts",
|
| 132 |
+
"KPI(\"KPI_AccDocItem_SUM_GainedCashDiscount\")\n/\nKPI(\"KPI_AccDocItem_SUM_PossibleCashDiscount\")\n"
|
| 133 |
+
],
|
| 134 |
+
[
|
| 135 |
+
"Definition: Calculate the proportion of gained cash discounts based on the total possible volume of cash discounts in the preceding month",
|
| 136 |
+
"KPI(\"FORMULA_AccDocItem_SUM_GainedCashDiscountLastMonth\")\n/\nKPI(\"FORMULA_AccDocItem_SUM_PossibleCashDiscountLastMonth\")\n"
|
| 137 |
+
],
|
| 138 |
+
[
|
| 139 |
+
"Definition: Calculate the proportion of gained cash discounts based on the total possible volume of cash discounts in the preceding quarter",
|
| 140 |
+
"KPI(\"FORMULA_AccDocItem_SUM_GainedCashDiscountLastQuarter\")\n/\nKPI(\"FORMULA_AccDocItem_SUM_PossibleCashDiscountLastQuarter\")\n"
|
| 141 |
+
],
|
| 142 |
+
[
|
| 143 |
+
"Definition: Calculate the proportion of gained cash discounts based on the total possible volume of cash discounts in the preceding year",
|
| 144 |
+
"KPI(\"FORMULA_AccDocItem_SUM_GainedCashDiscountLastYear\")\n/\nKPI(\"FORMULA_AccDocItem_SUM_PossibleCashDiscountLastYear\")\n"
|
| 145 |
+
],
|
| 146 |
+
[
|
| 147 |
+
"Definition: Calculate the proportion of gained cash discounts based on the total possible volume of cash discounts in the current month",
|
| 148 |
+
"KPI(\"FORMULA_AccDocItem_SUM_GainedCashDiscountThisMonth\")\n/\nKPI(\"FORMULA_AccDocItem_SUM_PossibleCashDiscountThisMonth\")\n"
|
| 149 |
+
],
|
| 150 |
+
[
|
| 151 |
+
"Definition: Calculate the proportion of gained cash discounts based on the total possible volume of cash discounts in the current quarter",
|
| 152 |
+
"KPI(\"FORMULA_AccDocItem_SUM_GainedCashDiscountThisQuarter\")\n/\nKPI(\"FORMULA_AccDocItem_SUM_PossibleCashDiscountThisQuarter\")\n"
|
| 153 |
+
],
|
| 154 |
+
[
|
| 155 |
+
"Definition: Calculate the proportion of gained cash discounts based on the total possible volume of cash discounts in the current year",
|
| 156 |
+
"KPI(\"FORMULA_AccDocItem_SUM_GainedCashDiscountThisYear\")\n/\nKPI(\"FORMULA_AccDocItem_SUM_PossibleCashDiscountThisYear\")\n"
|
| 157 |
+
],
|
| 158 |
+
[
|
| 159 |
+
"Definition: For items where the BSEG.AUGDT field is not null and the BSEG.BSCHL field is not 21, get the converted currency value",
|
| 160 |
+
"SUM( CASE \nWHEN \"BSEG\".AUGDT IS NULL \nAND \"BSEG\".\"BSCHL\" != '21' \nTHEN NULL\nELSE CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n\nEND )\n"
|
| 161 |
+
],
|
| 162 |
+
[
|
| 163 |
+
"Definition: Get a count of the BKPF table",
|
| 164 |
+
"COUNT_TABLE(\"BKPF\")"
|
| 165 |
+
],
|
| 166 |
+
[
|
| 167 |
+
"Definition: Get a count of the BSEG table",
|
| 168 |
+
"COUNT_TABLE(\"BSEG\")"
|
| 169 |
+
],
|
| 170 |
+
[
|
| 171 |
+
"Definition: Get a count of the LFB1 table",
|
| 172 |
+
"COUNT_TABLE(\"CDPOS_LFB1\")"
|
| 173 |
+
],
|
| 174 |
+
[
|
| 175 |
+
"Definition: Get a count of the _CEL_AP_ACTIVITIES table",
|
| 176 |
+
"COUNT_TABLE(\"_CEL_AP_ACTIVITIES\")"
|
| 177 |
+
],
|
| 178 |
+
[
|
| 179 |
+
"Definition: Get a count of the DUPLICATE_INVOICES table",
|
| 180 |
+
"COUNT_TABLE(\"DUPLICATE_INVOICES\")"
|
| 181 |
+
],
|
| 182 |
+
[
|
| 183 |
+
"Definition: Get a count of the EKBE table",
|
| 184 |
+
"COUNT_TABLE(\"EKBE\")"
|
| 185 |
+
],
|
| 186 |
+
[
|
| 187 |
+
"Definition: Get a count of the EKKO table",
|
| 188 |
+
"COUNT_TABLE(\"EKKO\")"
|
| 189 |
+
],
|
| 190 |
+
[
|
| 191 |
+
"Definition: Get a count of the EKPO table",
|
| 192 |
+
"COUNT_TABLE(\"EKPO\")"
|
| 193 |
+
],
|
| 194 |
+
[
|
| 195 |
+
"Definition: Get a count of the GROUPS_DUPLICATE_INVOICES table",
|
| 196 |
+
"COUNT_TABLE(\"GROUPS_DUPLICATE_INVOICES\")"
|
| 197 |
+
],
|
| 198 |
+
[
|
| 199 |
+
"Definition: Get a count of the INEFFICIENCIES table",
|
| 200 |
+
"COUNT_TABLE(\"INEFFICIENCIES\")"
|
| 201 |
+
],
|
| 202 |
+
[
|
| 203 |
+
"Definition: Get a count of the INEFFICIENCIES_AUGMENTED_FRAMED_VALUE table",
|
| 204 |
+
"COUNT_TABLE(\"INEFFICIENCIES_AUGMENTED_FRAMED_VALUE\")"
|
| 205 |
+
],
|
| 206 |
+
[
|
| 207 |
+
"Definition: Get a count of the LFA1 table",
|
| 208 |
+
"COUNT_TABLE(\"LFA1\")"
|
| 209 |
+
],
|
| 210 |
+
[
|
| 211 |
+
"Definition: Get a count of the LFB1 table",
|
| 212 |
+
"COUNT_TABLE(\"LFB1\")"
|
| 213 |
+
],
|
| 214 |
+
[
|
| 215 |
+
"Definition: Get a count of the RBKP table",
|
| 216 |
+
"COUNT_TABLE(\"RBKP\")"
|
| 217 |
+
],
|
| 218 |
+
[
|
| 219 |
+
"Definition: Get a count of the RSEG table",
|
| 220 |
+
"COUNT_TABLE(\"RSEG\")"
|
| 221 |
+
],
|
| 222 |
+
[
|
| 223 |
+
"Definition: Get a count of the T052 table",
|
| 224 |
+
"COUNT_TABLE(\"T052\")"
|
| 225 |
+
],
|
| 226 |
+
[
|
| 227 |
+
"Definition: Get a count of the T052_VEND table",
|
| 228 |
+
"COUNT_TABLE(\"T052_VEND\")"
|
| 229 |
+
],
|
| 230 |
+
[
|
| 231 |
+
"Definition: Get a count of the TCURF table",
|
| 232 |
+
"COUNT_TABLE(\"TCURF\")"
|
| 233 |
+
],
|
| 234 |
+
[
|
| 235 |
+
"Definition: Get a count of the TCURR table",
|
| 236 |
+
"COUNT_TABLE(\"TCURR\")"
|
| 237 |
+
],
|
| 238 |
+
[
|
| 239 |
+
"Definition: Get a count of the TCURX table",
|
| 240 |
+
"COUNT_TABLE(\"TCURX\")"
|
| 241 |
+
],
|
| 242 |
+
[
|
| 243 |
+
"Definition: Get a count of the Vendor_Data_Upload table",
|
| 244 |
+
"COUNT_TABLE(\"Vendor_Data_Upload\")"
|
| 245 |
+
],
|
| 246 |
+
[
|
| 247 |
+
"Definition: Calculate the proportion of cases where the BSEG.BSCHL field is 21",
|
| 248 |
+
"AVG(CASE WHEN \"BSEG\".\"BSCHL\" = '21'\n\nTHEN 1\n\nELSE 0\n\nEND)"
|
| 249 |
+
],
|
| 250 |
+
[
|
| 251 |
+
"Definition: Add up the total value of the BSEG.DMBTR field (displayed as a negative) for each item where the BSEG.BSCHL field is 21.",
|
| 252 |
+
"SUM(CASE \n\n\n\nWHEN \"BSEG\".\"BSCHL\" = '21' \n\n\n\nTHEN \"BSEG\".\"DMBTR\"*-1\n\n\n\nELSE 0 \n\n\n\nEND)"
|
| 253 |
+
],
|
| 254 |
+
[
|
| 255 |
+
"Definition: Get a sum of the total converted currency value for each item where the BSEG.BSCHL field is 21",
|
| 256 |
+
"SUM(CASE \n\nWHEN \"BSEG\".\"BSCHL\" = '21' \n\nTHEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n *-1\n\nELSE 0 \n\nEND)"
|
| 257 |
+
],
|
| 258 |
+
[
|
| 259 |
+
"Definition: Add together the credit_memo_value_usd_ and reverse_value_usd_ KPIs",
|
| 260 |
+
"KPI(credit_memo_value_usd_) + KPI(reverse_value_usd_)"
|
| 261 |
+
],
|
| 262 |
+
[
|
| 263 |
+
"Definition: Based on how early each item was paid, calculate the remaining days to pay the item.",
|
| 264 |
+
"((CASE\n WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") = 'Paid early before minimum due date'\n THEN KPI(\"FORMULA_AccDocItem_CALC_InvoiceClearingTime\") - KPI(\"FORMULA_AccDocItem_CALC_LowestAvailablePaymentDays\")\n WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") = 'Paid early before middle due date'\n THEN KPI(\"FORMULA_AccDocItem_CALC_InvoiceClearingTime\") - KPI(\"FORMULA_AccDocItem_CALC_MiddleAvailablePaymentDays\")\n WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") = 'Paid early before max. due date'\n THEN KPI(\"FORMULA_AccDocItem_CALC_InvoiceClearingTime\") - KPI(\"FORMULA_AccDocItem_CALC_MaximumAvailablePaymentDays\")\nEND) + 1 ) *-1.0"
|
| 265 |
+
],
|
| 266 |
+
[
|
| 267 |
+
"Definition: Subtract the FORMULA_AccDocItem_CALC_InvoiceClearingTime\ KPI from the - FORMULA_AccDocItem_CALC_MaximumAvailablePaymentDays KPI.
|
| 268 |
+
"KPI(\"FORMULA_AccDocItem_CALC_InvoiceClearingTime\") - KPI(\"FORMULA_AccDocItem_CALC_MaximumAvailablePaymentDays\") - 1"
|
| 269 |
+
],
|
| 270 |
+
[
|
| 271 |
+
"Definition: For invoices with a valid clearing input (cleared invoices), get the weighted average of the days between the BSEG.ZFBDT field and the BSEG.AUGDT field.",
|
| 272 |
+
"SUM(CASE\n WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_ClearingInputValid\") = 0 THEN 0.0\n ELSE DAYS_BETWEEN(ROUND_DAY(\"BSEG\".ZFBDT), \n ROUND_DAY(\"BSEG\".AUGDT)) \n * CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n \nEND)\n/\nSUM(CASE \n WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_ClearingInputValid\") = 0 THEN 0.0\n ELSE CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n\nEND)"
|
| 273 |
+
],
|
| 274 |
+
[
|
| 275 |
+
"Definition: For invoices with a cleared last month month, get the weighted average of the days between the BSEG.ZFBDT field and the BSEG.AUGDT field.",
|
| 276 |
+
"SUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastMonth\") = 1 THEN CASE\n WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_ClearingInputValid\") = 0 THEN 0.0\n ELSE DAYS_BETWEEN(ROUND_DAY(\"BSEG\".ZFBDT), ROUND_DAY(\"BSEG\".AUGDT)) * CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n END ELSE 0.0 END)\n/\nSUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastMonth\") = 1 THEN CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_ClearingInputValid\") = 0 THEN 0.0\n ELSE CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n\nEND ELSE 0.0 END)\n"
|
| 277 |
+
],
|
| 278 |
+
[
|
| 279 |
+
"Definition: For invoices with a cleared last quarter, get the weighted average of the days between the BSEG.ZFBDT field and the BSEG.AUGDT field.",
|
| 280 |
+
"SUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastQuarter\") = 1 THEN CASE\n WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_ClearingInputValid\") = 0 THEN 0.0\n ELSE DAYS_BETWEEN(ROUND_DAY(\"BSEG\".ZFBDT), ROUND_DAY(\"BSEG\".AUGDT)) * CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n END ELSE 0.0 END)\n/\nSUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastQuarter\") = 1 THEN CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_ClearingInputValid\") = 0 THEN 0.0\n ELSE CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n\nEND ELSE 0.0 END)\n"
|
| 281 |
+
],
|
| 282 |
+
[
|
| 283 |
+
"Definition: For invoices with a cleared last year, get the weighted average of the days between the BSEG.ZFBDT field and the BSEG.AUGDT field.",
|
| 284 |
+
"SUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastYear\") = 1 THEN CASE\n WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_ClearingInputValid\") = 0 THEN 0.0\n ELSE DAYS_BETWEEN(ROUND_DAY(\"BSEG\".ZFBDT), ROUND_DAY(\"BSEG\".AUGDT)) * CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n END ELSE 0.0 END)\n/\nSUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastYear\") = 1 THEN CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_ClearingInputValid\") = 0 THEN 0.0\n ELSE CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n\nEND ELSE 0.0 END)\n"
|
| 285 |
+
],
|
| 286 |
+
[
|
| 287 |
+
"Definition: For invoices with a cleared this month, get the weighted average of the days between the BSEG.ZFBDT field and the BSEG.AUGDT field.",
|
| 288 |
+
"SUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisMonth\") = 1 THEN CASE\n WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_ClearingInputValid\") = 0 THEN 0.0\n ELSE DAYS_BETWEEN(ROUND_DAY(\"BSEG\".ZFBDT), ROUND_DAY(\"BSEG\".AUGDT)) * CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n END ELSE 0.0 END)\n/\nSUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisMonth\") = 1 THEN CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_ClearingInputValid\") = 0 THEN 0.0\n ELSE CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n\nEND ELSE 0.0 END)\n"
|
| 289 |
+
],
|
| 290 |
+
[
|
| 291 |
+
"Definition: For invoices with a cleared this quarter, get the weighted average of the days between the BSEG.ZFBDT field and the BSEG.AUGDT field.",
|
| 292 |
+
"SUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisQuarter\") = 1 THEN CASE\n WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_ClearingInputValid\") = 0 THEN 0.0\n ELSE DAYS_BETWEEN(ROUND_DAY(\"BSEG\".ZFBDT), ROUND_DAY(\"BSEG\".AUGDT)) * CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n END ELSE 0.0 END)\n/\nSUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisQuarter\") = 1 THEN CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_ClearingInputValid\") = 0 THEN 0.0\n ELSE CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n\nEND ELSE 0.0 END)\n"
|
| 293 |
+
],
|
| 294 |
+
[
|
| 295 |
+
"Definition: For invoices with a cleared this year, get the weighted average of the days between the BSEG.ZFBDT field and the BSEG.AUGDT field.",
|
| 296 |
+
"SUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisYear\") = 1 THEN CASE\n WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_ClearingInputValid\") = 0 THEN 0.0\n ELSE DAYS_BETWEEN(ROUND_DAY(\"BSEG\".ZFBDT), ROUND_DAY(\"BSEG\".AUGDT)) * CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n END ELSE 0.0 END)\n/\nSUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisYear\") = 1 THEN CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_ClearingInputValid\") = 0 THEN 0.0\n ELSE CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n\nEND ELSE 0.0 END)\n"
|
| 297 |
+
],
|
| 298 |
+
[
|
| 299 |
+
"Definition: Calculate the sum of the converted currency of all items paid early, then divide it by the total sum of the converted currency of all items to get the proportion of items paid early weighted by converted currency value.",
|
| 300 |
+
"SUM(\nCASE WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%early%'\nTHEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n ELSE NULL END )\n/\nSUM( CASE WHEN \"BSEG\".AUGDT IS NULL THEN NULL\nELSE CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n\nEND )\n"
|
| 301 |
+
],
|
| 302 |
+
[
|
| 303 |
+
"Definition: Calculate the sum of the converted currency of all items paid late, then divide it by the total sum of the converted currency of all items to get the proportion of items paid late weighted by converted currency value.",
|
| 304 |
+
"SUM(\nCASE WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%late%'\nTHEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n ELSE NULL END )\n/\nSUM( CASE WHEN \"BSEG\".AUGDT IS NULL THEN NULL\nELSE CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n\nEND )\n"
|
| 305 |
+
],
|
| 306 |
+
[
|
| 307 |
+
"Definition: Divide the recent_payment_term_weighted_ KPI by the spend_last_12_months KPI.",
|
| 308 |
+
"(KPI(\"recent_payment_term_weighted_\"))\n\n/\n\n(KPI(\"spend_last_12_months\"))"
|
| 309 |
+
],
|
| 310 |
+
[
|
| 311 |
+
"Definition: Add together the total value of invoices which are marked as duplicates.",
|
| 312 |
+
"SUM ( CASE WHEN KPI(\"FORMULA_Duplicates_INDICATOR_DuplicateInvoice\") = 1 THEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",PU_MAX (\"GROUPS_DUPLICATE_INVOICES\", CASE WHEN \"BSEG\".\"SHKZG\" = 'H' THEN \"BSEG\".\"DMBTR\" ELSE 0 - \"BSEG\".\"DMBTR\" END) )\n END )"
|
| 313 |
+
],
|
| 314 |
+
[
|
| 315 |
+
"Definition: Add together the total value of invoices which were cleared last month.",
|
| 316 |
+
"SUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastMonth\") = 1 THEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n ELSE 0.0 END)"
|
| 317 |
+
],
|
| 318 |
+
[
|
| 319 |
+
"Definition: Add together the total value of invoices which were cleared last quarter.",
|
| 320 |
+
"SUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastQuarter\") = 1 THEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n ELSE 0.0 END)"
|
| 321 |
+
],
|
| 322 |
+
[
|
| 323 |
+
"Definition: Add together the total value of invoices which were cleared last year.",
|
| 324 |
+
"SUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastYear\") = 1 THEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n ELSE 0.0 END)"
|
| 325 |
+
],
|
| 326 |
+
[
|
| 327 |
+
"Definition: Add together the total value of invoices which were cleared this month.",
|
| 328 |
+
"SUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisMonth\") = 1 THEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n ELSE 0.0 END)"
|
| 329 |
+
],
|
| 330 |
+
[
|
| 331 |
+
"Definition: Add together the total value of invoices which were cleared this quarter.",
|
| 332 |
+
"SUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisQuarter\") = 1 THEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n ELSE 0.0 END)"
|
| 333 |
+
],
|
| 334 |
+
[
|
| 335 |
+
"Definition: Add together the total value of invoices which were cleared this year.",
|
| 336 |
+
"SUM(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisYear\") = 1 THEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n ELSE 0.0 END)"
|
| 337 |
+
],
|
| 338 |
+
[
|
| 339 |
+
"Definition: Calculate the average throughput time for all cases in days.",
|
| 340 |
+
"AVG(CALC_THROUGHPUT(CASE_START TO CASE_END, REMAP_TIMESTAMPS(\"_CEL_AP_ACTIVITIES\".\"EVENTTIME\", DAYS)))"
|
| 341 |
+
],
|
| 342 |
+
[
|
| 343 |
+
"Definition: Add together the total value of invoices which were paid early.",
|
| 344 |
+
"SUM(CASE WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%early%' THEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n ELSE 0.0 END)"
|
| 345 |
+
],
|
| 346 |
+
[
|
| 347 |
+
"Definition: Add together the total value of invoices which were paid late.",
|
| 348 |
+
"SUM(CASE WHEN UPPER(KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\")) LIKE '%LATE%' THEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n ELSE 0.0 END)"
|
| 349 |
+
],
|
| 350 |
+
[
|
| 351 |
+
"Definition: Add together the total value of invoices which were paid on schedule.",
|
| 352 |
+
"SUM(CASE WHEN UPPER(KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\")) LIKE '%ON SCHEDULE%' THEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n ELSE 0.0 END)"
|
| 353 |
+
],
|
| 354 |
+
[
|
| 355 |
+
"Definition: Add together the total value of invoices which were paid early or on schedule.",
|
| 356 |
+
"SUM(\n\nCASE WHEN KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%early%' OR KPI(\"FORMULA_AccDocItem_CLASSIFICATION_PaymentBehavior\") LIKE '%schedule%'\n\nTHEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n ELSE NULL END )\n"
|
| 357 |
+
],
|
| 358 |
+
[
|
| 359 |
+
"Definition: Divide the KPI_Activity_COUNT_ManualActivities KPI by the PI_AccDocItem_COUNTTABLE KPI",
|
| 360 |
+
"KPI(\"KPI_Activity_COUNT_ManualActivities\")\n/\nKPI(\"KPI_AccDocItem_COUNTTABLE\")"
|
| 361 |
+
],
|
| 362 |
+
[
|
| 363 |
+
"Definition: Based on the AccDocItem_INDICATOR_TouchlessInvoiceItem KPI, label an item as a touched or touchless invoice.",
|
| 364 |
+
"CASE WHEN KPI ( \"FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem\" ) = 1 THEN 'Touchless Invoice Lines' ELSE 'Touched Invoice Lines' END"
|
| 365 |
+
],
|
| 366 |
+
[
|
| 367 |
+
"Definition: For each item in the BKPF table, get the total number of invoice classifications.",
|
| 368 |
+
"CASE WHEN PU_COUNT_DISTINCT(BKPF, KPI ( \"FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem\" )) > 1 THEN 'Invoice Lines w/ different Touchless Classification' ELSE KPI(\"KPI_AccDocItem_CLASSIFICATION_TouchlessInvoice\") END"
|
| 369 |
+
],
|
| 370 |
+
[
|
| 371 |
+
"Definition: Get the average value of the FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem KPI for invoices clear in the preceding month",
|
| 372 |
+
"AVG(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastMonth\") = 1 THEN KPI(\"FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem\") ELSE NULL END)"
|
| 373 |
+
],
|
| 374 |
+
[
|
| 375 |
+
"Definition: Get the average value of the FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem KPI for invoices clear in the preceding quarter",
|
| 376 |
+
"AVG(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastQuarter\") = 1 THEN KPI(\"FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem\") ELSE NULL END)"
|
| 377 |
+
],
|
| 378 |
+
[
|
| 379 |
+
"Definition: Get the average value of the FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem KPI for invoices clear in the preceding year",
|
| 380 |
+
"AVG(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedLastYear\") = 1 THEN KPI(\"FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem\") ELSE NULL END)"
|
| 381 |
+
],
|
| 382 |
+
[
|
| 383 |
+
"Definition: Get the average value of the FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem KPI for invoices clear in the current month",
|
| 384 |
+
"AVG(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisMonth\") = 1 THEN KPI(\"FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem\") ELSE NULL END)"
|
| 385 |
+
],
|
| 386 |
+
[
|
| 387 |
+
"Definition: Get the average value of the FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem KPI for invoices clear in the current quarter",
|
| 388 |
+
"AVG(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisQuarter\") = 1 THEN KPI(\"FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem\") ELSE NULL END)"
|
| 389 |
+
],
|
| 390 |
+
[
|
| 391 |
+
"Definition: Get the average value of the FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem KPI for invoices clear in the current year",
|
| 392 |
+
"AVG(CASE WHEN KPI(\"FORMULA_AccDocItem_INDICATOR_InvoiceClearedThisYear\") = 1 THEN KPI(\"FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem\") ELSE NULL END)"
|
| 393 |
+
],
|
| 394 |
+
[
|
| 395 |
+
"Definition: Get the average value of the FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem KPI",
|
| 396 |
+
"AVG(KPI(\"FORMULA_AccDocItem_INDICATOR_TouchlessInvoiceItem\"))"
|
| 397 |
+
],
|
| 398 |
+
[
|
| 399 |
+
"Definition: Return the LFB1.LIFNR field",
|
| 400 |
+
"\"LFB1\".\"LIFNR\"\n\n\n\n"
|
| 401 |
+
],
|
| 402 |
+
[
|
| 403 |
+
"Definition: Return the LFB1.ZTERM field",
|
| 404 |
+
"\"LFB1\".\"ZTERM\""
|
| 405 |
+
],
|
| 406 |
+
[
|
| 407 |
+
"Definition: Based on the value of BSEG.ZBD3T, BSEG.ZBD2T, and BSEG.ZBD1T, pull the last item in which one of these fields is not zero to the LFA1 level.",
|
| 408 |
+
"CASE\n\n \n\n WHEN \"BSEG\".\"ZBD3T\" > 0 \n\n THEN PU_LAST(\"LFA1\",\"BSEG\".\"ZBD1T\")\n\n WHEN \"BSEG\".\"ZBD2T\" > 0 \n\n THEN PU_LAST(\"LFA1\",\"BSEG\".\"ZBD2T\")\n\n WHEN \"BSEG\".\"ZBD1T\" > 0 \n\n THEN PU_LAST(\"LFA1\",\"BSEG\".\"ZBD1T\")\n\n ELSE 0\n\n \n\nEND"
|
| 409 |
+
],
|
| 410 |
+
[
|
| 411 |
+
"Definition: Create payment term descriptions from payment terms key on vendor master, ignoring discount fields",
|
| 412 |
+
"-- reference Payment Terms Description KPI for a more readable version\n\n-- creates payment term descriptions from payment terms key on vendor master\n\n-- ignores ZPRZx fields are discount %\n\nCASE\n\n WHEN TO_INT (BIND( \"LFB1\", \"T052_VEND\".\"ZTAG3\")) <> 0 THEN\n\n 'Net ' || TO_INT ( BIND( \"LFB1\", \"T052_VEND\".\"ZTAG3\") ) \n\n -- || '; Discount Days 2: '|| TO_INT (BIND( \"LFB1\", \"T052_VEND\".\"ZTAG2\")) \n\n --|| ', ' || BIND( \"LFB1\", \"T052_VEND\".\"ZPRZ2\")|| '%'|| '; Discount Days 1: ' \n\n --|| TO_INT (BIND( \"LFB1\", \"T052_VEND\".\"ZTAG1\"))\n\n -- || ', ' || BIND( \"LFB1\", \"T052_VEND\".\"ZPRZ1\") || '%'\n\n WHEN TO_INT (BIND( \"LFB1\", \"T052_VEND\".\"ZTAG2\")) <> 0 \n\n THEN ' Net ' || TO_INT (BIND( \"LFB1\", \"T052_VEND\".\"ZTAG2\")) \n\n --|| '; Discount Days: ' || \n\n -- TO_INT (BIND( \"LFB1\", \"T052_VEND\".\"ZTAG1\")) || ', ' || BIND( \"LFB1\", \"T052_VEND\".\"ZPRZ1\") || '%'\n\n ELSE ' Net ' || TO_INT (BIND( \"LFB1\", \"T052_VEND\".\"ZTAG1\"))\n\nEND \n\n"
|
| 413 |
+
],
|
| 414 |
+
[
|
| 415 |
+
"Definition: Create payment term descriptions from payment terms key on vendor master",
|
| 416 |
+
"-- reference Payment Terms Description KPI for a more readable version\n\n-- creates payment term descriptions from payment terms key on vendor master\n\n-- if multiple terms appear, assumes ZTAG2 and ZTAG1 are discount days \n\n-- and ZPRZx fields are discount %\n\nCASE\n\n WHEN TO_INT (BIND( \"LFB1\", \"T052_VEND\".\"ZTAG3\")) <> 0 THEN\n\n 'Net ' || TO_INT ( BIND( \"LFB1\", \"T052_VEND\".\"ZTAG3\") ) || \n\n '; Discount Days 2: '|| TO_INT (BIND( \"LFB1\", \"T052_VEND\".\"ZTAG2\")) ||\n\n ', ' || BIND( \"LFB1\", \"T052_VEND\".\"ZPRZ2\")|| '%'|| '; Discount Days 1: ' || TO_INT (BIND( \"LFB1\", \"T052_VEND\".\"ZTAG1\"))\n\n || ', ' || BIND( \"LFB1\", \"T052_VEND\".\"ZPRZ1\") || '%'\n\n WHEN TO_INT (BIND( \"LFB1\", \"T052_VEND\".\"ZTAG2\")) <> 0 THEN\n\n ' Net ' || TO_INT (BIND( \"LFB1\", \"T052_VEND\".\"ZTAG2\")) || '; Discount Days: ' || \n\n TO_INT (BIND( \"LFB1\", \"T052_VEND\".\"ZTAG1\")) || ', ' || BIND( \"LFB1\", \"T052_VEND\".\"ZPRZ1\") || '%'\n\n ELSE ' Net ' || TO_INT (BIND( \"LFB1\", \"T052_VEND\".\"ZTAG1\"))\n\nEND "
|
| 417 |
+
],
|
| 418 |
+
[
|
| 419 |
+
"Definition: Take the product of the wc_underweight KPI and the spend_last_12_months KPI",
|
| 420 |
+
"KPI(\"wc_underweight\")*KPI(\"spend_last_12_months\")\n\n\n\n"
|
| 421 |
+
],
|
| 422 |
+
[
|
| 423 |
+
"Definition: Subtract the wc_2023_rr KPI from the wc_baseline_rr KPI",
|
| 424 |
+
"KPI(\"wc_2023_rr\")-KPI(\"wc_baseline_rr\")\n\n \n\n"
|
| 425 |
+
],
|
| 426 |
+
[
|
| 427 |
+
"Definition: Take the sum of the differences between the wc_2023_rr KPI and the wc_baseline_rr KPI",
|
| 428 |
+
"sum(KPI(\"wc_2023_rr\")-KPI(\"wc_baseline_rr\"))\n\n \n\n"
|
| 429 |
+
],
|
| 430 |
+
[
|
| 431 |
+
"Definition: Divide the pt_12_pt_dic KPI by 365",
|
| 432 |
+
"KPI(\"pt_12_pt_dic\")/365"
|
| 433 |
+
],
|
| 434 |
+
[
|
| 435 |
+
"Definition: When the BKPF.BUDAT field is between 2022-05-01 and 2023-04-30, take the sum of the wc_rr_test_comb_kpi KPI.",
|
| 436 |
+
"CASE \n\n WHEN \"BKPF\".\"BUDAT\" >= TO_DATE ( '2022-05-01' , FORMAT ( '%Y-%m-%d' ) ) \n\n AND \"BKPF\".\"BUDAT\" <= TODAY()\n\n --TO_DATE ( '2023-04-30' , FORMAT ( '%Y-%m-%d' )) \n\n THEN (KPI(\"wc_rr_test_comb_kpi\"))\n\n ELSE 0\n\n END\n\n\n\n \n\n"
|
| 437 |
+
],
|
| 438 |
+
[
|
| 439 |
+
"Definition: Take the sum of the wc_2023_rr KPI for all items",
|
| 440 |
+
"sum(kpi(wc_2023_rr))\n\n \n\n"
|
| 441 |
+
],
|
| 442 |
+
[
|
| 443 |
+
"Definition: When the BKPF.BUDAT field is between 2022-01-01 and 2022-12-30, return the wc_rr_test_comb_kpi KPI",
|
| 444 |
+
"CASE \n\n WHEN \"BKPF\".\"BUDAT\" >= TO_DATE ( '2022-01-01' , FORMAT ( '%Y-%m-%d' ) ) \n\n AND \"BKPF\".\"BUDAT\" <= TO_DATE ( '2022-12-30' , FORMAT ( '%Y-%m-%d' )) \n\n THEN (KPI(\"wc_rr_test_comb_kpi\"))\n\n ELSE 0\n\n END\n\n\n\n \n\n"
|
| 445 |
+
],
|
| 446 |
+
[
|
| 447 |
+
"Definition: Take either the BSEG.ZBD3T, BSEG.ZBD2T, or BSEG.ZBD1T field (whichever one is non-zero) and multiply it by the converted currency value for each item.",
|
| 448 |
+
" (\n\n CASE\n\n \n\n WHEN \"BSEG\".\"ZBD3T\" > 0 \n\n\n\n THEN \"BSEG\".\"ZBD3T\"\n\n\n\n WHEN \"BSEG\".\"ZBD2T\" > 0 \n\n\n\n THEN \"BSEG\".\"ZBD2T\"\n\n\n\n WHEN \"BSEG\".\"ZBD1T\" > 0 \n\n\n\n THEN \"BSEG\".\"ZBD1T\"\n\n\n\n ELSE 0\n\n\n\n END) \n\n --/365\n\n * \n\n\n\n (CASE \n\n\n\n WHEN \"BSEG\".\"BSCHL\" IN_LIKE ('31','32') \n\n\n\n THEN CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n \n\n\n\n ELSE 0 \n\n\n\n END)\n\n"
|
| 449 |
+
],
|
| 450 |
+
[
|
| 451 |
+
"Definition: Get the proportion of cases where the payment method is W",
|
| 452 |
+
"AVG(\n\n CASE WHEN KPI(payment_method) = 'W'\n\n THEN 1\n\n ELSE 0\n\n END\n\n)"
|
| 453 |
+
],
|
| 454 |
+
[
|
| 455 |
+
"Definition: Subtract avg DPO from 60 and multiply by net value over last 12 months. This KPI identifies the working capital opportunity available if all payments were made in 60 days.
|
| 456 |
+
"(60 - KPI(KPI_AccDocItem_AVG_DaysPayableOutstanding))/365*(\nKPI(\"net_value_usd_last_12_months\"))\n\n/*\n\nSUM(\n\n CASE WHEN\n\n DAYS_BETWEEN(PU_LAST(\"BSEG\",\"_CEL_AP_ACTIVITIES\".\"EVENTTIME\",\"_CEL_AP_ACTIVITIES\".\"ACTIVITY_EN\" = 'Due Date passed' ), \"BSEG\".ZFBDT) > 60\n\n THEN 0 ELSE\n\n ((60 - DAYS_BETWEEN(PU_LAST(\"BSEG\",\"_CEL_AP_ACTIVITIES\".\"EVENTTIME\",\"_CEL_AP_ACTIVITIES\".\"ACTIVITY_EN\" = 'Due Date passed' ), \"BSEG\".ZFBDT)) / 365) * CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"WAERS\",\"BKPF\".\"CPUDT\",\"BSEG\".\"WRBTR\")\n\n\n\n END\n\n)\n\n*/\n\n\n\n--(60 - KPI(days_payable_outstanding_unweighted_)) / 365 * KPI(net_value)\n"
|
| 457 |
+
],
|
| 458 |
+
[
|
| 459 |
+
"Definition: Subtract avg DPO from 75 and multiply by net value over last 12 months. This KPI identifies the working capital opportunity available if all payments were made in 75 days.
|
| 460 |
+
"-- subtract avg DPO from 75 and multiply by net value over last 12 months\n-- identifies opportunity available if all payments were made in 75 days\n\n(75 - KPI(KPI_AccDocItem_AVG_DaysPayableOutstanding))/365*(\nKPI(\"net_value_usd_last_12_months\"))\n\n/*\n\nSUM(\n\n CASE WHEN\n\n DAYS_BETWEEN(PU_LAST(\"BSEG\",\"_CEL_AP_ACTIVITIES\".\"EVENTTIME\",\"_CEL_AP_ACTIVITIES\".\"ACTIVITY_EN\" = 'Due Date passed' ), \"BSEG\".ZFBDT) > 30\n\n THEN 0 ELSE\n\n ((30 - DAYS_BETWEEN(PU_LAST(\"BSEG\",\"_CEL_AP_ACTIVITIES\".\"EVENTTIME\",\"_CEL_AP_ACTIVITIES\".\"ACTIVITY_EN\" = 'Due Date passed' ), \"BSEG\".ZFBDT)) / 365) * CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"WAERS\",\"BKPF\".\"CPUDT\",\"BSEG\".\"WRBTR\")\n\n\n\n END\n\n)\n\n*/\n\n\n\n-- (75 - KPI(days_payable_outstanding_unweighted_)) / 365 * KPI(net_value)\n"
|
| 461 |
+
],
|
| 462 |
+
[
|
| 463 |
+
"Definition: Subtract avg DPO from the target DPO and multiply by net value over last 12 months. This KPI identifies the working capital opportunity available if all payments were made in in the target DPO days.
|
| 464 |
+
"-- subtract avg DPO from target DPO and multiply by net value over last 12 months\r\n-- identifies opportunity available if all payments were made in target DPO \r\n\r\n(83 - KPI(KPI_AccDocItem_AVG_DaysPayableOutstanding))/365*(\r\nKPI(\"net_value_usd_last_12_months\"))"
|
| 465 |
+
],
|
| 466 |
+
[
|
| 467 |
+
"Definition: Subtract avg DPO from 90 and multiply by net value over last 12 months. This KPI identifies the working capital opportunity available if all payments were made in 90 days.
|
| 468 |
+
"-- subtract avg DPO from 90 and multiply by net value over last 12 months\n-- identifies opportunity available if all payments were made in 90 days\n\n(90 - KPI(KPI_AccDocItem_AVG_DaysPayableOutstanding))/365*(\nKPI(\"net_value_usd_last_12_months\"))\n\n\n/*SUM(\n\n CASE WHEN\n\n DAYS_BETWEEN(PU_LAST(\"BSEG\",\"_CEL_AP_ACTIVITIES\".\"EVENTTIME\",\"_CEL_AP_ACTIVITIES\".\"ACTIVITY_EN\" = 'Due Date passed' ), \"BSEG\".ZFBDT) > 90\n\n THEN 0 ELSE\n\n ((90 - DAYS_BETWEEN(PU_LAST(\"BSEG\",\"_CEL_AP_ACTIVITIES\".\"EVENTTIME\",\"_CEL_AP_ACTIVITIES\".\"ACTIVITY_EN\" = 'Due Date passed' ), \"BSEG\".ZFBDT)) / 365) * CURRENCY_CONVERT_SAP ('USD', 'M',\"BKPF\".\"MANDT\", \"BKPF\".\"HWAER\",\"BKPF\".\"CPUDT\",\"BSEG\".\"DMBTR\", \"BKPF\".\"SOURCE_SYSTEM\")\n\n\n END\n\n)\n\n*/\n\n\n\n-- (90 - KPI(days_payable_outstanding_unweighted_)) / 365 * KPI(net_value)\n"
|
| 469 |
+
],
|
| 470 |
+
[
|
| 471 |
+
"Definition: Subtract the average on time payment ratio from this year from the average duplicate ratio from last year and divide it by the average on time payment ratio from last year, in order to calculate the percent change in on time payment ratio from last year to this year.",
|
| 472 |
+
"(KPI(\"FORMULA_AccDocItem_AVG_OnTimePaymentValueRatioThisYear\") - KPI(\"FORMULA_AccDocItem_AVG_OnTimePaymentValueRatioLastYear\")) / KPI(\"FORMULA_AccDocItem_AVG_OnTimePaymentValueRatioLastYear\")"
|
| 473 |
+
],
|
| 474 |
+
[
|
| 475 |
+
"Definition: Calculate the difference between average days payable outstanding this year compared to last year.",
|
| 476 |
+
"(KPI(\"FORMULA_AccDocItem_AVG_DaysPayableOutstandingThisYear\") - KPI(\"FORMULA_AccDocItem_AVG_DaysPayableOutstandingLastYear\"))"
|
| 477 |
+
],
|
| 478 |
+
[
|
| 479 |
+
"Definition: Subtract the average cash discount ratio from this year from the average duplicate ratio from last year and divide it by the average cash discount ratio from last year, in order to calculate the percent change in cash discount ratio from last year to this year.",
|
| 480 |
+
"(KPI(\"FORMULA_AccDocItem_AVG_CashDiscountValueRatioThisYear\") - KPI(\"FORMULA_AccDocItem_AVG_CashDiscountValueRatioLastYear\")) / KPI(\"FORMULA_AccDocItem_AVG_CashDiscountValueRatioLastYear\")"
|
| 481 |
+
],
|
| 482 |
+
[
|
| 483 |
+
"Definition: Subtract the average touchless invoice ratio from this year from the average duplicate ratio from last year and divide it by the average touchless invoice ratio from last year, in order to calculate the percent change in touchless invoice ratio from last year to this year.",
|
| 484 |
+
"(KPI(\"FORMULA_AccDocItem_AVG_TouchlessInvoiceRatioThisYear\") - KPI(\"FORMULA_AccDocItem_AVG_TouchlessInvoiceRatioLastYear\")) / KPI(\"FORMULA_AccDocItem_AVG_TouchlessInvoiceRatioLastYear\")"
|
| 485 |
+
],
|
| 486 |
+
[
|
| 487 |
+
"Definition: Subtract the average duplicate ratio from this year from the average duplicate ratio from last year and divide it by the average duplicate ratio from last year, in order to calculate the percent change in duplicate value ratio from last year to this year.",
|
| 488 |
+
"(KPI(\"FORMULA_AccDocItem_AVG_DuplicateValueRatioThisYear\") - KPI(\"FORMULA_AccDocItem_AVG_DuplicateValueRatioLastYear\")) / KPI(\"FORMULA_AccDocItem_AVG_DuplicateValueRatioLastYear\")"
|
| 489 |
+
]
|
| 490 |
+
]
|