Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ShellyG
Creator
Creator

Filter Pane with a variable

Hi there, 

I will need your help on an issue, which I am experiencing with Qlik Sense.

I have a dashboard where I need to see the data distributed per year. I also have a switch to change between Fiscal Years and Calendar Years. The switch has been created with an inline table ([~VIEWBY6_NAME]) and works perfectly. 

The problem starts with a filter that I have, where the users should be able to select a specific year. In order for this filter pane to work with the fiscal/calendar switch, I have created the following variable for the year filter:

if([~VIEWBY6_NAME]='Fiscal', FISCAL_YEAR
,if([~VIEWBY6_NAME]='Calendar', CALENDAR_YEAR))

I would expect that if a user selects 'Calendar' and then they select for example '2017' from the year filter with the above variable, they will be able to see the data only for Calendar Year 2018. What actually happens is that when a user selects '2017' and Calendar, this selection is not only applied to the Calendar Year but to the Fiscal Year as well. I can even see it in the selections that appear above (attached screenshot after selecting only 'Calendar' and '2017', Fiscal year appears without me wanting it to).

How can I make it understand that when I switch to see only Calendar Years, I want to make selections only in the calendar years and not in the fiscal ones? 

Thanks a lot in advance! 

Labels (2)
1 Reply
mfarsln
Creator II
Creator II

You should consider using Date Bridge tables and only one master calendar table. Check this

Canonical Date - Qlik Community - 1463578