Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have a sorting problem.
I have a time dimension/table drilled down to the following for the year 2000-2020: year, month, week, day, hour.
For sorting i have another field DATEID with the following format: YYYYMMDDHH.
Now i have a simple bar chart where i sum up a value over each hour of the current day.
The sorting works fine - i put a sorting using the formualr over the field DATEID.
However, if i do a bar chart where a put the months on the x-axis the sorting doesnt work anymore.
I dont understand the problem to be honest.
Can somebody help me out or give some advice?
Ok, i found 'a' solution - however i have to say that it doesnt make sense and for me it is a bug in Qlik unless
somebody can give me another explanation.
I have an integer field [MONAT_SORT] in the format YYYYMM.
Using this field for sorting doesnt work when the data is being grouped down to the hour, so (YYYYMMDDHH).
If i do another field for sorting using this function the sorting works perfectly:
DATE#([MONAT_SORT], 'YYYYMM').
Maybe somebody can enlighten me ...
it's because Date(,'YYYMMM') is still a Date; just formatted as YYYYMM
if you do NUM#(Date(,'YYYMMM') ) will be a whole number.
Ok but i should be able to sort a whole number too, no?
yes; NUM#(Date(,'YYYMMM') ) will work