Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

OR

if([Detailed status] = 'On Hold - M', ceil(if([Delivered Date] < Opened, Opened, [Delivered Date]) - [Opened])) as [Days Onhold],

But if Delivered date is blank what can I do to get my days on hold?  Delivered Date < Opened OR Delivered Date <> ''..... How can I write that IF statement?

thx

jude

11 Replies
sunny_talwar

May be this

If([Detailed status] = 'On Hold - M',

      Ceil(If([Delivered Date] < Opened or Len(Trim([Delivered Date])) > 0, Opened, [Delivered Date]) - [Opened])) as [Days Onhold],

Anonymous
Not applicable
Author

Works but just realized if Delivered Date is blank I don’t get any number for Days On Hold. So, how would I add if Delivered Date is blank then today – opened?

Jude Shoop

Sr. Analyst – Technical Information Applications

Arkema Inc.

900 First Avenue

King Of Prussia, PA 19406

Office: 610.205.7194

Mobile: 610.304.5608

sunny_talwar

Something like this may be

If([Detailed status] = 'On Hold - M',

      Ceil(

              If(Len(Trim([Delivered Date])) = 0, Today(),

              If([Delivered Date] < Opened, Opened, [Delivered Date])) - [Opened])) as [Days Onhold],

Anonymous
Not applicable
Author

Thank you, thank you, thank you!!!!!!!!!!!!!!!

sunny_talwar

No problem at all... If you got what you wanted, please close the thread by marking correct and helpful responses.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny

Anonymous
Not applicable
Author

Actions just hangs up on me.....qlikhangs.png

Anonymous
Not applicable
Author

Sunny,

I hate being stupid…..

Based on the On – Hold – M code you helped me with, do my Days Outstanding & Duration Days look correct? (I am thinking they are not)

if(Not match(, 'Closed Canceled', 'Closed Completed','delivered', 'Delivered -A','Request Rejected - A'), today() - ) as ,

if(match(, 'delivered', 'Delivered -A','Closed Completed'), ceil(if( < Opened, Opened, ) - )) as ,

If( = 'On Hold - M',

Ceil(

If(Len(Trim()) = 0, Today(),

If( < Opened, Opened, )) - )) as ,

Jude Shoop

Sr. Analyst – Technical Information Applications

Arkema Inc.

900 First Avenue

King Of Prussia, PA 19406

Office: 610.205.7194

Mobile: 610.304.5608

sunny_talwar

You work near King Of Prussia? I am in Valley Forge .

Coming back to your question... not sure I understand what you looking to get?

Anonymous
Not applicable
Author

Yup, Hi neighbor

Ok so I have my number of hold days, now I need to know days outstanding & duration days.

If it's not on hold, not closed canceled, not closed complete, not delivered, how many days outstanding.

if(Not match([Detailed status], 'Closed Canceled', 'Closed Completed','delivered', 'Delivered -A','Request Rejected - A'),  today() - [Opened]) as [Days Outstanding],

IF it's delivered, delivered -A, Closed Completed, how many days did it take?


if(match([Detailed status], 'delivered', 'Delivered -A','Closed Completed'), ceil(if([Delivered Date] < Opened, Opened, [Delivered Date]) - [Opened])) as [Duration (Days)],

Hope this makes sense