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

Distinct dates from latest to oldest as dynamic values for variable input

I am trying to create a variable input to display all distinct values in [date] column from latest to oldest. Currently I am able to display from oldest to latest.

Denzyl_0-1661760578713.png

Code used to create options above:

=CONCAT(DISTINCT [date.autoCalendar.YearMonth],'|',[date.autoCalendar.YearMonth])

How would I be able to flip the order?

Labels (1)
1 Solution

Accepted Solutions
Filippo_Nicolussi_P

Could the thread here https://community.qlik.com/t5/QlikView-App-Dev/Concat-a-field-with-a-sort-on-expression/td-p/279063  help somehow for an expression on the only date.autoCalendar ? 

 

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!

View solution in original post

2 Replies
Filippo_Nicolussi_P

Could the thread here https://community.qlik.com/t5/QlikView-App-Dev/Concat-a-field-with-a-sort-on-expression/td-p/279063  help somehow for an expression on the only date.autoCalendar ? 

 

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!
Denzyl
Contributor II
Contributor II
Author

All I had to do was to add a minus sign to the sort-weight parameter to reverse it.

=CONCAT(DISTINCT [date.autoCalendar.YearMonth],'|',-[date.autoCalendar.YearMonth])