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: 
Not applicable

How to sort filter pane( in another state) by expression??

Hi,

I have a filter pane consisting of 3 values MOM,QOQ and YOY, based on any selection made in the type fields i want my "From Dates" and "To Dates" sorted by those values( Please see attached screenshot). Then based on the selection made in each dates( From and To) i want values to individually reflect in 2 different Bar Charts. I have used Alternate States extension object to implement this however i have added 2 filter panes for the 3 values one for For Date type and the other for To Date type . I feel the 2nd one doesn't make sense and is repetitive. How can i sort the To Date filter based on selection made in For Date Type. eg:- If the user selects MOM i want both filter panes( For and To) to be sorted .. I tried to use expression in the sorting tab by writing {Alt} type. However this is throwing an error.

and is not bale to read values from original state until you use an aggregate function like sum({Alt} sales). The screenshot attached is self - explanatory and thanks in advance.

3 Replies
Gysbert_Wassenaar

The screenshot attached is self - explanatory

No it is not. It doesn't explain anything to me.

How is the selection of MOM, QOQ or YOY related to the sorting of dates? You can sort a date numerically in ascending or descending order or if you want to be silly you can sort it as text A-Z or Z-A. I never heard of a MOM or QOQ sorting.


talk is cheap, supply exceeds demand
Not applicable
Author

Okky, my bad. Let m explain. MOM refers to dates combined as Months, QOQ refers to Quarters and YOY refers to Years.

Year(DateKey) as Year,

Month(DateKey) as Month,

Day(DateKey) as Day,

ApplyMap('QuartersMap', month(DateKey), Null()) as Quarter

So if i have selected MOM then my dates are combined as Months( 12 in a year). Here i can choose a single month( say April) which is reflected in the bar chart with sales for April. I can also select YOY in the other filter pane(To) and then i would get all Years in another filter pane, here i can select 1 year to get aggregated sales data in bar chart for 1 year i.e for eg say 2015. This will help me do Month To Year comparison.( April 2015 to whole of 2015)

Gysbert_Wassenaar

So if i have selected MOM then my dates are combined as Months( 12 in a year

How? What is doing the combining of dates into months?

I also don't understand where the sorting comes in. What needs to be sorted where and in what order?


talk is cheap, supply exceeds demand