Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
karthikoffi27se
Creator III
Creator III

DD:HH:MM format

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

1 Solution

Accepted Solutions
tresesco
MVP
MVP

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' ) )

Capture.JPG

View solution in original post

7 Replies
tresesco
MVP
MVP

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?

shiveshsingh
Master
Master

can you post sample data and expected output?

karthikoffi27se
Creator III
Creator III
Author

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

TATCount of Request ID
> 5 days <= 7 days50
> 4 hours <=5 days7
<= 4 hours15

This is my expected output.

Many Thanks

Karthik

tresesco
MVP
MVP

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' ) )

Capture.JPG

karthikoffi27se
Creator III
Creator III
Author

stalwar1‌ Can you help me with this please

Anonymous
Not applicable

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.

Anil_Babu_Samineni

Not really sure, why tresesco solution is not helpful for you? Can you elaborate more for that?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful