Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
kvr9
Creator
Creator

Drop down filter of quarter based on Month selection

Hi ,

I have an issue with populating the date filter i.e Month and Quarter.

I want it to be in drop down format(Used Pivot chart).

I want to give the default as Month when nothing is selected ,followed by Quarter.

Please find the attached example.

13 Replies
jaumecf23
Creator III
Creator III

In the dimension name you can use something like that :

=if(GetSelectedCount(Quarter)=0,'Quarter',MaxString(Quarter))

The Quarter value will be visible if a Quarter has been selected.

kvr9
Creator
Creator
Author

Hi,

I want quarter to reflect when the month is selected, with your query quarter has been  populated when the quarter is selected.

jaumecf23
Creator III
Creator III

Then you can add as formulas as fields you need to check. Something like that :

=if(GetSelectedCount(Quarter)=0 or GetSelectedCount(Month)=0,'Quarter',MaxString(Quarter))

kvr9
Creator
Creator
Author

Thank you Jaume, it worked but when I select multiple month /Quarter that should also reflect.

I tired using concat but its throwing an error

jaumecf23
Creator III
Creator III

Sorry I did a mistake. Try this:

=if(GetSelectedCount(Quarter)=0 and GetSelectedCount(Month)=0,'Quarter',MaxString(Quarter))

kvr9
Creator
Creator
Author

Yes,I tired using 'AND' only

jaumecf23
Creator III
Creator III

The result is not what you are expecting ? Can you attach and example of the behavour that you need.

kvr9
Creator
Creator
Author

I mean the Initial requirement has worked with your query.

I'm also looking for an additional requirement.

it worked for one selection  but when I select multiple month /Quarter thae same should also reflect.

I tired using concat but its throwing an error

ex:Jan,Jun then Quater must be Q1,Q2

jaumecf23
Creator III
Creator III

Maybe this : =if(GetSelectedCount(Quarter)=0 and GetSelectedCount(Month)=0,'Quarter',concat(DISTINCT Quarter,', '))

??