Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Contributor II

Interval difference -0:00 instead of 0:00

Hello,

I have 2 time expressions A and B. Sometimes the time difference can be less than zero, but when the difference is zero, I am getting -0:00 instead of 0:00 and when I export the data to excel, I get #####. A and B expression values come from crazy scripting(SQL and QlikView programming mix) so I was thinking if I can modify the C expression on the chart itself to get 0:00 instead of -0:00. C is a expression where I am just doing B-A and have set it to interval: h:mm format. Can someone please help if you know of a solution? I tried IF(B-A = "-0:00", "0:00",B-A), but that still gives -0:00.

ABC
10/17/2017 11:2810/17/2017 11:28-0:00

Thank you.

Tags (1)
1 Solution

Accepted Solutions
Highlighted

Re: Interval difference -0:00 instead of 0:00

I mean this is how I would check something like this... I have not tested this, but if your are checking for seconds, then try this:

If(Round(B-A, 1/86400) = 0, '0.00', B-A)

for minutes

If(Round(B-A, 1/1440) = 0, '0.00', B-A)

View solution in original post

4 Replies
Highlighted

Re: Interval difference -0:00 instead of 0:00

Why don't you try Round() function?

Highlighted
Contributor II

Re: Interval difference -0:00 instead of 0:00

Hi Sunny,

I haven't used round function in QlikView yet. Do you think with round function I will still be able to get the negative time difference? Also, will it still consider the seconds difference? Time difference on this application is so important for improvement so I can't even ignore the seconds differences.

Thanks.

Highlighted

Re: Interval difference -0:00 instead of 0:00

I mean this is how I would check something like this... I have not tested this, but if your are checking for seconds, then try this:

If(Round(B-A, 1/86400) = 0, '0.00', B-A)

for minutes

If(Round(B-A, 1/1440) = 0, '0.00', B-A)

View solution in original post

Contributor II

Re: Interval difference -0:00 instead of 0:00

Amazing as always. Is there anything on QlikView that you can't solve? haha thanks again Sunny.