Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello
i have KPI and i want to show all project exclude the project that has this details , what should i do to remove this project:
PROJECT_NAME = {'SS'}, LIABILITY = {'Others'}
, this is my backend script :
LIB CONNECT TO 'ERP_PR';
Plan:
SQL SELECT
plan_name,
PROJECT_NUMBER as PROJECT_NUMBER1,
CHARACTER4 as "PROJECT_NAME" ,
QUANTITY as QUANTITY1,
DEPARTMENT as DEPARTMENT1,
CHARACTER6 "RESULT",
TRANSACTION_DATE,
CHARACTER7 as "LIABILITY",
FROM apps.aab_aa_INFO_XV
where plan_id = 111685 ;
Plan_new:
LOAD
*,
Date(floor(TRANSACTION_DATE), 'DD/MM/YYYY') AS Master_Calendar_Date_Num,
if(Match(Upper(PROJECT_NAME), 'DATA ', 'Data ', 'Datee'), 'Data',
If( Match(Upper(PROJECT_NAME), 'PRO', 'pRO', 'pro'), 'Pro',
If( Match(Upper(PROJECT_NAME), 'NE-18', 'NE -105 '), 'NE',
If( Match(Upper(PROJECT_NAME), 'AA', 'AB '), 'AA',
PROJECT_NAME)))) as Project_Name_CP,
Pick(Match(LIABILITY, '002', '003',LIABILITY),
'Customer', 'Others',
LIABILITY) as Plan_Liability1
RESIDENT Plan ;
DROP TABLE Plan;
thank you
If you want to remove such projects from the data model I believe you should add conditions to your sql where-statement (and project_name<>'SS' and liability<>'Others').
If you want to remove only from kpi calculation you can do it using set expressions, something like:
sum({<PROJECT_NAME -= {'SS'}, Plan_Liability1 -= {'Others'}>} QUANTITY1)
Try this
WHERE plan_id = 111685
AND NOT (CHARACTER4 = 'SS' AND CHARACTER7 = 'Others')
Or
Sum({<PROJECT_NAME -= {'SS'}, LIABILITY -= {'Others'}>} QUANTITY1)