Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have data which consists of series of month. I dont know how to sort the as a series, and it keeps sorting alphabetically, so instead of January, February, March...., it is still keep sorting like April, February, January.
How to solve this? thanx
It seems that your month field is a text field. You can sort these values by expression : =date#(Month, 'MMMM')
Hi,
The reason for this is because Qlik handles it like a string, not as a date.
Couple of questions and possible solutions:
If you don't have that, you do a mapping with an inline table:
mapNumericMonth2Month:
Mapping Load * Inline [
January, 1
February, 2
March, 3
April, 4
May, 5
June, 6
July, 7
August, 8
September, 9
October, 10
November, 11
December, 12
];
YourTableWithFacts:
Load
*,
ApplyMap('mapNumericMonth2Month',Month,0) as NumericMonth
From [YourSource];
Jordy
Climber
where do i fill the data field?
You can do this in the script, or do you work in the data manager?
Jordy
Climber
where do I write this code? Actually I want to sort the month data as filter pane, so then I write this in the expression of the filter pane or where?
That depends on where you want to solve your problem. But taking the option of @tresesco , you can fill this in your filterpane if you want to, just enter =Date#(Month('Month'),'MMMM')
Better would be to do this in the script editor of Qlik Sense. This way, you don't have to fix this everytime you want to use your month field. Do you know how you can do this?
Jordy
Climber
If you have loaded this Excel in Qlik Sense via the Data Manager, there should be a locked script. You can unlock this by clicking 'unlock' in the top right corner.
Then you will see your script and your 'Month' field. Replace this field in your script with the following line:
Date#(Month([Sheet1.bln.ing]),'MMMM') as Month,
Check if you need the comma at the end, you don't need it if this is last field in the table.
Jordy
Climber