Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
tka_ovako
Contributor II
Contributor II

Sorting timestamps

Hello.

I have scrip that link Year and Month:

num(Year (timestamp(max(EventEndDate)))) & num(Month (timestamp(max(EventEndDate))))  as EventEndYearMonth

however in chart I get wierd compination:

After 20169 come 20171  and after 20182 come 201610 an so on. I know this is some kind onf soting problem but how I fix it?

BR

Timo

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Please try with

Year (timestamp(max(EventEndDate))) *100 + Month (timestamp(max(EventEndDate)))

View solution in original post

5 Replies
Clever_Anjos
Employee
Employee

Please try with

Year (timestamp(max(EventEndDate))) *100 + Month (timestamp(max(EventEndDate)))

YoussefBelloum
Champion
Champion

Hi,

try to set the sorting of your dimension to: numeric value ascending

and uncheck the rest

chinnuchinni
Creator III
Creator III

Use below script for Month,You will get your require result

=num(Month (timestamp(max(EventEndDate))),'00') 

chinnuchinni
Creator III
Creator III

=num(Year (timestamp(max(EventEndDate))))&num(Month (timestamp(max(EventEndDate))),'00')  as EventEndYearMonth

tka_ovako
Contributor II
Contributor II
Author

Thank you Clever. That Works. Also praveen's solution seems to work!