Discussion board where members can get started with Qlik Sense.
I spent the last two days trying to solve this problem and looking for solutions in the forum but none of them worked. So here's the issue.
I have dates in the table I'm loading in the following format: YYYYMMDD.
The script I'm using is the following:
date((date#(DASCAX,'YYYYMMDD')),'DD/MM/YYYY') as [Expiration date],
I'm using this to let Qlik interpret my date and convert it in DD/MM/YYYY format.
I then have to create a bar chart which has date in MM-YYYY (or alternatively MMM-YYYY) on the x-axis.
When I create the dimension I specify the following:
The problem comes when I try to order dates: whichever expression I use, dates are displayed as follows:
How can I sort them? What am I getting wrong?
Thanks in advance
Go to Solution.
Have you tried to sort by your date dimension? And it should be sorted numerically
Try this, in your script, create a new field :
,AutoNumber([Expiration Date], '%Date ID') as [%Date ID]
then in your chart, sort by this [%Date ID]
I lose any format (MM-YYYY) using autonumber in the script
Keep your date field and add another field using autonumber.
In your chart, as a dimension use your date field and sort it by your DateID
I wasn't paying attention at the sorting order. I thought disabling any kind of sorting for my measure (placed first than dimension) would do the work as well.
Thanks Sunny as always.