Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Gang
Contributor II
Contributor II

Sorting changes when selection made

Hi ,

I Created a Month filed by using the expression in script

"Pick(Right(RptMonth,2) , 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec') AS Mntname" and the another filed as RptMonth it has a data like 202007. Now my question are I need to create a chart it has to static even when selection made.

The below expression helps me to achieve it  

Match(only({1}Mntname),'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')

But i created an another expression by using dual function but its not static  when selection made.

Dual(only({1}Mntname),right(RptMonth,2))

Could anyone helps me to understand why ?

Thanks

1 Solution

Accepted Solutions
tm_burgers
Creator III
Creator III

I can't particularly explain why - but I would suggest reworking your load script to create the month as a datefield

 

something like - 

 

makedate(left(RptMonth,4),right(RptMonth,2)) as RptMonth 

 

then this will get picked up by the autoCalendar function - and then you can use the autoCalendar Month. 

RptMonth.autoCalendar.Month in your visualization - which should ensure that the sorting is 👍

 

 

View solution in original post

1 Reply
tm_burgers
Creator III
Creator III

I can't particularly explain why - but I would suggest reworking your load script to create the month as a datefield

 

something like - 

 

makedate(left(RptMonth,4),right(RptMonth,2)) as RptMonth 

 

then this will get picked up by the autoCalendar function - and then you can use the autoCalendar Month. 

RptMonth.autoCalendar.Month in your visualization - which should ensure that the sorting is 👍