Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi There
Please assist on the following: I currently want my analysis to return the string where if the field <= 1.5 should return "Trips Depart <=90min" else should return "Trips Depart greater than 90min",
check I have wrote the logic on data loader :
If((Interval("[Var Actual vs Planned]") <= 1.5) , 'Trips Depart <=90min of Planned Trip Start Time',
'Trips Depart Greater than 90min of Planned Trip Start Time') as [% of trips departing within 90 minutes ],
But the above logic is not returning the correct values on the analyze sheet. The only time it returns the second statement (Trips Depart Greater than 90min of Planned Trip Start Time) it is when there is null or (-)value.
please see the attachments and assist .
Thanks in advance!
hi
perhaps try this
If((Interval("[Var Actual vs Planned]") <= '1.5') , 'Trips Depart <=90min of Planned Trip Start Time',
'Trips Depart Greater than 90min of Planned Trip Start Time') as [% of trips departing within 90 minutes ],
Like this?
If((Interval("[Var Actual vs Planned]",'mm') <= 90) , 'Trips Depart <=90min of Planned Trip Start Time',
'Trips Depart Greater than 90min of Planned Trip Start Time') as [% of trips departing within 90 minutes ]
or
If((Interval("[Var Actual vs Planned]",'mm') <=Interval('01:30','hh:mm')*24*60) , 'Trips Depart <=90min of Planned Trip Start Time',
'Trips Depart Greater than 90min of Planned Trip Start Time') as [% of trips departing within 90 minutes ]
@BrunPierre & @brunobertels thanks so much , i have tried to check the above solution and here is the one that best corrected my logic
if(Interval([Var Actual vs Planned])>0,
if((Interval([Var Actual vs Planned])*24)>1.5,
'Trips Depart Greater than 90min of Planned Trip Start Time','Trips Depart <=90min of Planned Trip Start Time'),
'Trips Depart <=90min of Planned Trip Start Time') as [% of trips departing within 90 minutes of the planned trip start ]
Thanks once again!