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: 
datanibbler
Champion
Champion

Trouble with the max() fct

Hi,

I have a table with a date and a time.

=> Out of those, I have made a numeric value (date) and a number 1 or 2, depending on which shift the time falls into.

=> I have concatenated those, so I have one number now representing both the date and the shift.

=> Now I want to draw the latest (biggest) value from the table, using the max() function

<=> Somehow that does not work. I get several values, so in a chart I cannot display it - well, I could, but having anything else

        than EXACTLY ONE date_time there is no good, and I don't know why I get these anyway? The max() function should return

        only one line, no?

(I have aggregated the table on the day_and_shift beforehand, so there should be only one line with every one of those numbers.)

Can anybody help me out with this?

Thanks a lot!

Best regards,

DataNibbler

11 Replies
datanibbler
Champion
Champion
Author


Oh my - that seems to work now.

That kind of stuff is driving me crazy - I spend a lot of time undoing and redoing pieces of code without being conscious of making any real changes - and suddenly it works and I don't know why...

datanibbler
Champion
Champion
Author

Hi,

strangely, I keep finding that although I can uniquely identify a record, e.g. by the item_number (I always generate a field with ROWNO() to test that) - there is no date_value ... in a database!? Then how and why is that item in there at all?

Sometimes I can't help thinking that the programmers who designed our database must have been taking something, or typing with a girl lying on their desk or whatever 😉