Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
Now I´m stucked, I have tried to figuer out a way to calculate number of days from from start to stop date but have not succed.
Attached are a qvd with simplyfied data for two cases.
I want the Date (field in qvd = Datum) for the decisiondate (Atgardkod = BES) - Startdate (Datum for "Lopnummer" = 1 )
Like ... If(Atgardkokd = 'BES', Date(Datum) - If(Lopnummer = 1, Date(Datum) as WaitingTime
Try a straight table chart with dimension %DiarieKey and as expression:
=only({<Atgardkod= {BES}>}Datum ) - only({<Lopnummer={1}>} Datum)
Hope this helps,
Stefan
edit:
Or if you want to do it in the script:
INPUT:
LOAD %DiarieKey,
DatumOrginal,
Datum,
Atgardkod,
Lopnummer,
BesDate,
AnsDate
FROM
.\Tmp.qvd
(qvd);
LOAD %DiarieKey,
only(If(Atgardkod = 'BES', Datum)) - only(If(Lopnummer = 1, Datum)) as WaitingTime
Resident INPUT group by %DiarieKey;
added script based solution
Try a straight table chart with dimension %DiarieKey and as expression:
=only({<Atgardkod= {BES}>}Datum ) - only({<Lopnummer={1}>} Datum)
Hope this helps,
Stefan
edit:
Or if you want to do it in the script:
INPUT:
LOAD %DiarieKey,
DatumOrginal,
Datum,
Atgardkod,
Lopnummer,
BesDate,
AnsDate
FROM
.\Tmp.qvd
(qvd);
LOAD %DiarieKey,
only(If(Atgardkod = 'BES', Datum)) - only(If(Lopnummer = 1, Datum)) as WaitingTime
Resident INPUT group by %DiarieKey;
added script based solution
Thanks. The Only function was new for me.