Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

straight table expression query

Hello All,

I have one more query

I have been calculating the the difference between two dates in the straight table.now i want to only show values which are in negative and show 0 where the value is positive.

Please help me with this.not sure how to do this.

    

order idorder_dateorder end dateshipment datedelivery date(orderdate - shipment date)
1 -1
2 -2
3 2
4 3

Thanks & Regards,

Jaya

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

If((orderdate - shipment date) < 0, (orderdate - shipment date), 0)

and on the presentation tab, uncheck the option of Suppress When Zero.

View solution in original post

8 Replies
sunny_talwar

May be like this:

If((orderdate - shipment date) < 0, (orderdate - shipment date), 0)

and on the presentation tab, uncheck the option of Suppress When Zero.

jonathandienst
Partner - Champion III
Partner - Champion III

=RangeMin(orderdate - shipment date, 0)

This will replace positive results with zero.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks a lot

Anonymous
Not applicable
Author

Hi Jaya,

If your issue is resolved, please take a moment to Mark Replies as Correct or Helpful.

Thank you,

Qlik Community Team

Not applicable
Author

Thanks Sunny

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer.

If not, please make clear what part of your question you still need help with .

May you live in interesting times!
Not applicable
Author

Hello Onno,

I could not find the option to do that.

Please let me know where i can do that from.

Regards,

jaya

oknotsen
Master III
Master III

See attached screenshot.

May you live in interesting times!