Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Creator III
Creator III

Date in bar chart Sorting Qliksense

Hello Team,

 

I have below set of MonthYear in my script:

Dim_Time:
LOAD %Key_Date,

Date,
Date(Date,'MMM-YY') as NewTestvb1,
Date(Date, 'DD/MM/YYYY') as Addmonths_Date,
Date(MonthStart(Date),'MMM-YY') as MonthYear,
//Date(AddMonths(Date,01)) as Date_filter,
num(Date) as new,
month(subfield(Date, ' ' ,1)) &' '& Year(subfield(Date, ' ' ,1)) as Filter_Date,
//Dual(Left( Date(MonthStart(Date),'MMM-YY'))&'/'&Right( Date(MonthStart(Date),'MMM-YY')) , Date#(Date, 'MMM/YY')) as YourDate,

 

When i take this "MonthYear" dimension in table or chart, the monthyear is getting sorted on the basis of data like below:-

 

Aspiring_Developer_0-1595940412780.png

 

I also tried to sort the month using inline table, linked it with Date table and sorted as per the inline numeric value, it still does not work:-

Sorting_Date:

Load * Inline [

Date.Month, Number
Jan,1
Feb,2
Mar,3
Apr,4
May,5
Jun,6
Jul,7
Aug,8
Sep,9
Oct,10
Nov,11
Dec,12

];

 

 

Please help me as i am stuck on this and my deadline is near. I checked my forums, didn't find much.

 

Thanks in advance.

1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

Yes. move the date field to the top and sorting will work.

 

Close the thread as answered if no further questions

View solution in original post

3 Replies
dplr-rn
Partner - Master III
Partner - Master III

From a quick look it looks as if the sorting is on your expression descending.

78,74,61,61,60.....

You may have set the sorting incorrectly.

Share screenshot of your sorting options and i can try and help

 

Aspiring_Developer
Creator III
Creator III
Author

@dplr-rn 

 

Thank you for your reply. 

Here is the screenshot :-

Aspiring_Developer_0-1595945759821.png

 

 

Thanks

dplr-rn
Partner - Master III
Partner - Master III

Yes. move the date field to the top and sorting will work.

 

Close the thread as answered if no further questions