Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Invalid expression *, when i put al column in group by , works but dont need put all column , i have to calculated mesures by client ID
CLIENT:
LOAD ID as CLIENT_ID ,
MMM,
SMV,
NBR
FROM
(qvd);
Score:
load
CLIENT_ID,
MMM/(MAX (MMM))*100 as MMM1,
SMV/(MAX (SMV))*100 AS VRD1,
NBR/(MAX (NBR))*100 AS RELATION1
resident CLIENT
Group BY CLIENT_ID;
Well, thats the only whay here, use all Field in Group by.
But that will gives you one measure per CLIENT_ID,or?
Score:
load
CLIENT_ID,
MMM/(MAX (MMM))*100 as MMM1,
SMV/(MAX (SMV))*100 AS VRD1,
NBR/(MAX (NBR))*100 AS RELATION1
resident CLIENT
Group BY CLIENT_ID,MMM,SMV,NBR;
You can't reference max(MMM) and MMM in the same load statement. This will need 3 steps:
CLIENT:
LOAD ID as CLIENT_ID ,
MMM,
SMV,
NBR
FROM
(qvd);
Join(CLIENT)
LOAD
CLIENT_ID,
MAX (MMM) as MMM1,
MAX (SMV) AS SMV1,
MAX (NBR) AS NBR1
Resident CLIENT
Group BY CLIENT_ID;
Score:
LOAD CLIENT_ID,
MMM,
SMV,
NBR,
MMM / MMM1 * 100 as MMM1,
SMV / SMV1 * 100 as VRD,
NBR / NBR1 * 100 as RELATION
Resident CLIENT;
DROP Table CLIENT;
thank you Jonath but with this script i have the same result for all MMM SMV NBR
I suggest you post a small sample qvw and data file and clearly indicate the output you require.