Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

interval for a date - do some math with the result, only "-" as output

I loaded my timestamps to qlikview via SQL.

The timestamp is in the format: dd.mm.yyyy hh:mi:ss

I calculate the Intervall with Interval(first_date-second_date,'m') to output minutes.

After that i encapsulate it with fabs that i only get positive numbers.

Now i have 2 rows with some value in them. My final step would be to compare those 2 and pick the smaler one and output it in a third row.

My problem is that everything except the final step works pretty good but i cant archive it to display the smaler value.

I either just get a "-" or a blank cell. If i try to output some text aswell with value & 'some text' the correct value and the text is display. But i just want the value, not with the text.

Any help is welcome. thanks

5 Replies
sunny_talwar

May be your dates are not read as TimeStamp and you need to use TimeStamp#() function to make QlikView understand that its TimeStamp field so that you can carry out numeric operations to it

Clever_Anjos
Employee
Employee

Would you mind sharing a piece of your data or even a sample of your qvw?

richard_chilvers
Specialist
Specialist

Its hard to make suggestions without seeing how your script works so far.

I have achieved similar things before by using a GROUP BY in the load, and taking the MIN(value). Maybe that's something you could explore ?

anlonghi2
Creator II
Creator II

Hi Christoph,

try using Interval# instead of Interval

Not applicable
Author

Thanks for your answers. During the preperation of the sample the issue somehow solves itself. I dont know exactly what was the major point that it works now but i will attach a sample so if someone has the same problem he can take a look at the sample and figure it out.