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

date sorting not working as expected

I have a log-in activity file, consisting of a date field (in standard 'ccyy-mm-dd' date format), a user id, and a user employer id.

I have a bar graph with log-in date defined as the dimension on the x-axis (each instance of date found showing at the bottom), and user_id count as the measure on the y-axis.

I have sorting turned off for the count, as that sequences the dates by value of count for the date (ascending or descending).

Turning sort on for date sorts dates seems to start with normal date sequence, but if the November 30 has the same number of logins as November 3, then it pulls November 30 next to November 3, out of sequence.  Etc.

I have another chart of the same information without the problem, so I'm wondering if the type of chart may control this; e.g. perhaps one is a bar chart and the other started as a combo chart...?

That appears to be it; if I create a combo chart, and display the measure as bars, the dates are sequenced on the x-axis in date sequence.  So the question is, "is that intentional?".

1 Solution

Accepted Solutions
plexpro52
Creator
Creator
Author

Okay, now I've reproduced it.  It happens for either combo or bar chart.

The "Sorting" section provides as sort fields both the measure field "count(id_user)" and the dimension field "date_login".  By default, it has the measure field as the first sort field.  My first tactic was to turn it off, thinking that since sorting for only the dimension was turned on, that it would correctly sort by that field.  For some reason, it does not.  Changing from "Auto" to "numeric" or "alphabetic" sorting doesn't make any difference.

If I drag the date field to the first sort position, then it sorts correctly, using the "Auto" selection.

Thank you.

View solution in original post

4 Replies
ecolomer
Master II
Master II

can you upload the file QV to see, please?

plexpro52
Creator
Creator
Author

Hello Enrique,

Sorry for the delay, especially as it no longer misbehaves, and whatever manipulation I attempt doesn't reproduce it.  I can't show it to you now.    If it happens again, I'll be sure immediately to set aside the file for upload and inspection.

ecolomer
Master II
Master II

OK; don't worry

plexpro52
Creator
Creator
Author

Okay, now I've reproduced it.  It happens for either combo or bar chart.

The "Sorting" section provides as sort fields both the measure field "count(id_user)" and the dimension field "date_login".  By default, it has the measure field as the first sort field.  My first tactic was to turn it off, thinking that since sorting for only the dimension was turned on, that it would correctly sort by that field.  For some reason, it does not.  Changing from "Auto" to "numeric" or "alphabetic" sorting doesn't make any difference.

If I drag the date field to the first sort position, then it sorts correctly, using the "Auto" selection.

Thank you.