Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All--
I am looking to use the below set analysis but also add a dimension using a date calc/IF function. I need to count a distinct number of pick up moves (PUP) if the (Stop Time - the Arrival time) is between -120 and 120 minutes.
I have the distinct part covered but I am unsure how to add the calculated part to it.
count(DISTINCT{$<[Stop Type] ={'PUP'}>}[TMW move#])
Thank you!
Jessica
I would suggest you to create in script like
Sample:
Load [stop time],
[arrival time],
If(Inteval([stop time] - [arrival time],'HH') >= '-120' and Inteval([stop time] - [arrival time],'HH') <= '120', 1, 0) as Flag,
[Stop Type],
[TMW move#]
From <Data Source>;
Or
Sample:
Load [stop time],
[arrival time],
[Stop Type],
[TMW move#]
From <Data Source>;
Left Join (Sample)
Load *,
If(Inteval([stop time] - [arrival time],'HH') >= '-120' and Inteval([stop time] - [arrival time],'HH') <= '120', 1, 0) as Flag
Resident Sample;
Create Dimensions and expression like
Count({<[Stop Type] = {PUP}, Flag = {1}>} DISTINCT [TMW move#])
May be this
Count(DISTINCT{$<[Stop Type] ={'PUP'}, [TMW move#] = {"=fabs([Stop Time] - [Arrival time]) <= MakeTime(2)"}>}[TMW move#])