Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Honki
Contributor
Contributor

SORT DD-MM

Hi!

I have my date(DD-MM) i want to use in my bar chart,  as you can see in the screen.

 

Honki_0-1655994354053.png

I would like to sort it.

Thanks in advance!

Labels (2)
7 Replies
brunobertels
Specialist III
Specialist III

Hi 

To get the right sorting order use dual() function 

MarcoWedel

how did you create these dates?

Honki
Contributor
Contributor
Author

Hello!

 

I wrote this Date(A,'DD-MMM'),  where A is my date field.

Honki
Contributor
Contributor
Author

Can you show me exactly how to do, plz?

after writing dual( month(A), day(A)), then???

 

Thanks in advance!

brunobertels
Specialist III
Specialist III

Hi 

I assume your date format for field A is somethink like this by default DD-MM-YYYY

for example 05-01-2022 

in your graph you writed as date dimension this 

date(A,'DD-MMM') to get this date format 25-avr. ; 28-mai ; 16- juin etc 

then without order parameter you get wrong order in X abscisse like that : 

brunobertels_0-1656064972360.png

 

So if your field A for date is well recognise as an integer in format DD-MM-YYYY just select in order panel order by number : 

 

brunobertels_1-1656065120124.png

 

You can also force the order with dual function like that : 

dual(date(DATE_JOUR,'DD-MMMM'),num(DATE_JOUR)) 

for you : 

dual(date(A,'DD-MMMM'),num(A))

add this mesure in the panel option under order // order by expression // ascending 

brunobertels_2-1656065247779.png

 

regards 

 

Honki
Contributor
Contributor
Author

It doesnt work!

 

I did what you said and i got this below:

Honki_0-1656072766146.png

1.Date(A, 'DD-MMMM')

2.dual(Date(A, 'DD-MMMM'),Num(A)) in sorting by expression

 

brunobertels
Specialist III
Specialist III

Hi 

What is your date format from field A ?

can you provide an exemple