Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have the data where it is in DD:HH:MM format, now I need to use a if condition to extract anything less than <= 7 days and <= 5 days and <= 4 hours. Can you help me to achieve this please?
Many Thanks
Karthik
LOAD REQUEST_NO,
Interval#(TAT,'DD:hh:mm') as TAT
Calculated dimension:
=If(TAT>5 and TAT<=7, '>5 days <=7 days',
if(TAT>4/24 and TAT<=5, '>4 hours days <=5 days', '<= 4 hours' ) )
Your if condition looks to be not so convincing. Anything <=4 hours would always satisfy your other two conditions. Hence, checking only the last condition would be enough. Could you post a sample data set and expected output to understand your requirement better?
can you post sample data and expected output?
Hi
I have attached the sample data, My output should be like >5 days <= 7 days I need to count request ID for this interval this pattern is followed for remaining if condition ie
TAT | Count of Request ID |
---|---|
> 5 days <= 7 days | 50 |
> 4 hours <=5 days | 7 |
<= 4 hours | 15 |
This is my expected output.
Many Thanks
Karthik
LOAD REQUEST_NO,
Interval#(TAT,'DD:hh:mm') as TAT
Calculated dimension:
=If(TAT>5 and TAT<=7, '>5 days <=7 days',
if(TAT>4/24 and TAT<=5, '>4 hours days <=5 days', '<= 4 hours' ) )
stalwar1 Can you help me with this please
Hello Karthik,
You have to separate days, hours and minutes and/or to get it easier calculate all in days:
LOAD
REQUEST_NO,
Sum(Day+Hour+Minute) as Days
Group By REQUEST_NO;
LOAD REQUEST_NO,
Subfield(TAT,':',1) as Day,
Subfield(TAT,':',2)/24 as Hour,
Subfield(TAT,':',3)/1440 as Minute
FROM TAT.xls (biff, embedded labels, table is Sheet1$);
Then you can use the function Class() to create your column Task or with a If Condition,
Hope this will help you,
Jonathan L.
Not really sure, why tresesco solution is not helpful for you? Can you elaborate more for that?