Skip to main content

New to Qlik Sense

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

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
niha
Creator II
Creator II

Sorting Date

Hi,

I need sorting of Yearmonth in Asc or Desc format.

This data contain 10 year and I want to limit it to 5 years like 2012 to 1017 Month Year.  In the following format I am not able to sort it Please help. YearMonth is autogenertaed calender. I need a YearMonth ASc or Desc order so that I can show trend of  a measure.  Either....2017Jan, 2017Feb................2017Dec, 2016Jan, 2016Feb so on .. or 201701,201702,....

My coding in Load Editor is

 Date(Date#([Date of Hire], 'M/D/YYYY') ) AS [DOH],
Year([Date of Hire]) as Year,
Month([Date of Hire]) as Month,

Untitled.png

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hi 

for your year month you can use dual field 

which will include your text representation on the year month and numeric value 

something like : dual (YOUR_YEAR_MONTH_FIELD, monthstart([Date of Hire]) ) as YearMonth

View solution in original post

2 Replies
lironbaram
Partner - Master III
Partner - Master III

hi 

for your year month you can use dual field 

which will include your text representation on the year month and numeric value 

something like : dual (YOUR_YEAR_MONTH_FIELD, monthstart([Date of Hire]) ) as YearMonth

niha
Creator II
Creator II
Author

Hi,

Thanks. did not try as I got the field from data manager. But very helpful.

Thanks,

Niha