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

Creating a date drop down filter using a Chart

Hi Team,

I'm trying to create a Year,Month and Quater filter using a drop down option in a pivot chart.

When I tired to populate the selected year it is giving the selection but when I opt for clear option then it is replaced by '-'  .

Can some one help me to identify the way to replace the '- ' with any default year when you click clear.

Also for Month when nothing is selected then it showing '-'.

Please find the source data and qvw.

Thanks In advance.

8 Replies
tresesco
MVP
MVP

May be using label expression like this?

Capture.JPG

bohravanraj
Partner - Creator II
Partner - Creator II

Hi Vijaya,

You can use getselectedcount().

for E.g. : If(getselectedCount(Year) = 0,Max(Year),Year).


Check if its work for u.


-Vanraj Dinesh Bohra

kvr9
Creator
Creator
Author

Hi ,

Thank you for your quick response,both the way worked for the Year.

But its not reflecting for month.can you please help me out

tresesco
MVP
MVP

Since your month field is a text field, max() would not work directly. Try label expression like:

=Month(max(Date#(Month,'MMM')))

kvr9
Creator
Creator
Author

Hi Tresesco,

Thank you.

But the output was showing only one month in display (i.e max month is shown),I think user might be confused if it is showing only month,Can we have any default value if nothing has been selected

kvr9
Creator
Creator
Author

It would be great help if you let me know for quarter as well

tresesco
MVP
MVP

I don't understand. You have separate fields for month, year and quarter and you want them to be available like in a drop down using straight table. Could you explain a bit more? May be explain with an example.

kvr9
Creator
Creator
Author

Please find attached qvw