Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i have a calculated dimension like this:
month ( orderdeliverydatefrom) &"-"& year (orderdeliverydatefrom).
it works but the sorting is wrong:
mar-2013
jan-2013
jul-2012
feb-2013
and so on.
i tried working with sorting by an expression on the calculated dimension.
and there i sorted ascending with the field "orderdeliverydatefrom" in the expression field.
but it doesn't work.
can someone help me with this?
thanx!
chris
Hi Chris,
The best way to get this done is to create an actual "SortDate" field in the script, then use it in the Sort tab of the chart properties. For QlikView, "jan-2013" is a text string, and it will sort by ASCII codes, not as dates. If you use a date field that QlikView understands as numeric (using function Date() for example) the the sorting will make sense.
Hope that helps.
Miguel
Change your field creation with the use of dual
Dual( month ( orderdeliverydatefrom) &"-"& year (orderdeliverydatefrom) ,Num(Year(orderdeliverydatefrom) & Num(month ( orderdeliverydatefrom))))
And use Sort by exp as numeric
Or just use
Max(Year(DatePurchase) & Num(Month(DatePurchase)))
As sort-by expression