Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I wanted to do count with multiple If condition. I need help to draft formula for below given case.
Count incident Number, If Incident Assessment Time is 0 or Incident Clearance Time is 0 or All Travel Lanes Open Timestamp is 0 .
Hi,
Data_TMP:
LOAD * Inline[
ID, Incident Assessment Time, Incident Clearance Time, All Travel Lanes Open Timestamp
1, 1, 1, 1
2, 1, 0, 1
3, 1, 1, 0
4, 0, 1, 1
];
You can try the following expression:
Count({<[Incident Assessment Time]={'0'}>+<[Incident Clearance Time]={'0'}>+<[All Travel Lanes Open Timestamp]={'0'}>}ID)
Result:
Regards,
Vitalii
Hi,
I guess it should look like this
Count({<[Incident Assessment Time]={'0'}, [Valid/Invalid Flag] ={''}>+<[Incident Clearance Time]={'0'}, [Valid/Invalid Flag] ={''}>+<[All Travel Lanes Open Timestamp]={'0'}, [Valid/Invalid Flag] ={''}>}ID)
Regards,
Vitalii
Hi,
Data_TMP:
LOAD * Inline[
ID, Incident Assessment Time, Incident Clearance Time, All Travel Lanes Open Timestamp
1, 1, 1, 1
2, 1, 0, 1
3, 1, 1, 0
4, 0, 1, 1
];
You can try the following expression:
Count({<[Incident Assessment Time]={'0'}>+<[Incident Clearance Time]={'0'}>+<[All Travel Lanes Open Timestamp]={'0'}>}ID)
Result:
Regards,
Vitalii
I really appreciate your help here. It is working exactly. I need to add one more condition in that formula to count incident number with invalid flags only and it is [Valid/Invalid Flag]={''}. Can you suggest how should I add it?
Hi,
I guess it should look like this
Count({<[Incident Assessment Time]={'0'}, [Valid/Invalid Flag] ={''}>+<[Incident Clearance Time]={'0'}, [Valid/Invalid Flag] ={''}>+<[All Travel Lanes Open Timestamp]={'0'}, [Valid/Invalid Flag] ={''}>}ID)
Regards,
Vitalii
It Worked! Thanks once again.