Hi Andreas,
Try this setup:
Dimension:
CASE WHEN
PU_COUNT(
DOMAIN_TABLE("TEST_csv"."TRANSPORTER_ID")
,"TEST_csv"."TRANSPORTER_ID"
,PU_COUNT(
DOMAIN_TABLE("TEST_csv"."TRANSPORTER_ID")
,"TEST_csv"."PKG_ID"
,MINUTES_BETWEEN("TEST_csv"."ACTUAL","TEST_csv"."SLA") < 0
) > 0
) > 0 THEN 'TRANSPORTER WITH AT LEAST ONE PACKAGE DELIVERED LATE'
ELSE 'TRANSPORTER ON TIME'
END
KPI:
COUNT(DISTINCT "TEST_csv"."TRANSPORTER_ID")
SLA = need to be delivered
ACTUAL = is delivered
Hi Andreas,
Try this setup:
Dimension:
CASE WHEN
PU_COUNT(
DOMAIN_TABLE("TEST_csv"."TRANSPORTER_ID")
,"TEST_csv"."TRANSPORTER_ID"
,PU_COUNT(
DOMAIN_TABLE("TEST_csv"."TRANSPORTER_ID")
,"TEST_csv"."PKG_ID"
,MINUTES_BETWEEN("TEST_csv"."ACTUAL","TEST_csv"."SLA") < 0
) > 0
) > 0 THEN 'TRANSPORTER WITH AT LEAST ONE PACKAGE DELIVERED LATE'
ELSE 'TRANSPORTER ON TIME'
END
KPI:
COUNT(DISTINCT "TEST_csv"."TRANSPORTER_ID")
SLA = need to be delivered
ACTUAL = is delivered
Hi Eugene,
thanks for your efforts.
Unfortunately the query does not give me the right output.
Dimension:
CASE WHEN
PU_COUNT(DOMAIN_TABLE("ACTIVITIES"."CASE_ID")
,"ACTIVITIES"."CASE_ID"
, PU_COUNT(
DOMAIN_TABLE("ACTIVITIES"."CASE_ID")
,"ACTIVITIES"."HANDLINGUNIT"
,MINUTES_BETWEEN ( "ACTIVITIES"."GEPLANTER_BEDARFSZEITPUNKT", "ACTIVITIES"."TIMESTAMP_QUIT" )<0
)>0
)>0 THEN 'to late' ELSE 'on time' END
KPI:
COUNT(DISTINCT "ACTIVITIES"."CASE_ID")
OUTPUT:
to late: 344
on time: 1
Desired Output:
to late: 30
on time: 315
best regards,
Andreas
Hi Andreas,
Try this setup:
Dimension:
CASE WHEN
PU_COUNT(
DOMAIN_TABLE("TEST_csv"."TRANSPORTER_ID")
,"TEST_csv"."TRANSPORTER_ID"
,PU_COUNT(
DOMAIN_TABLE("TEST_csv"."TRANSPORTER_ID")
,"TEST_csv"."PKG_ID"
,MINUTES_BETWEEN("TEST_csv"."ACTUAL","TEST_csv"."SLA") < 0
) > 0
) > 0 THEN 'TRANSPORTER WITH AT LEAST ONE PACKAGE DELIVERED LATE'
ELSE 'TRANSPORTER ON TIME'
END
KPI:
COUNT(DISTINCT "TEST_csv"."TRANSPORTER_ID")
SLA = need to be delivered
ACTUAL = is delivered
The hint to create the query with the "DOMAIN_TABLE"-statement was worth gold!! Tahnks for that Eugene.
I now did it this way in the dimension:
CASE WHEN
PU_COUNT(DOMAIN_TABLE ( "ACTIVITIES"."CASE_ID"), "ACTIVITIES"."CASE_ID",
MINUTES_BETWEEN ( "ACTIVITIES"."GEPLANTER_BEDARFSZEITPUNKT", "ACTIVITIES"."TIMESTAMP_QUIT" )>0
)>0
THEN 'to late' else 'on time' end
The hint to create the query with the "DOMAIN_TABLE"-statement was worth gold!! Tahnks for that Eugene.
I now did it this way in the dimension:
CASE WHEN
PU_COUNT(DOMAIN_TABLE ( "ACTIVITIES"."CASE_ID"), "ACTIVITIES"."CASE_ID",
MINUTES_BETWEEN ( "ACTIVITIES"."GEPLANTER_BEDARFSZEITPUNKT", "ACTIVITIES"."TIMESTAMP_QUIT" )>0
)>0
THEN 'to late' else 'on time' end
Oh, now that I see the actual table names - you can use the cases table instead of domain table with activity.case_key, it should yield the same result. In any case - glad you were able to make this work!