Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
TBQlikNewbi
Contributor II
Contributor II

Literal Value from Filter Pane

I need to be able to choose "YTD" or " QTD" for an application, and then have the charts on the sheet reflect the appropriate date ranges for those values.  I was going to try and use ValueList and literals (e.g. ValueList('YTD','QTD')) in a filter pane, but when I do that, the selection doesn't seem to go anywhere, because it's not in the data model.  Any suggestions?

1 Reply
JordyWegman
Partner - Master
Partner - Master

Hi,

First, do you have a calendar in your data model?

If you don't, create one. If you do, create two indicators YTD and QTD

    if(date(Date,'MMDD')&'' <= date($(vToday),'MMDD') & '',1,0)				as _indYTD,  
    if(date(Date,'QQDD')&'' <= date($(vToday),'QQDD') & '',1,0)				as _indQTD,  

 Use these indicators as Set Analysis in your formulas in your charts.

Make then a variable that you can switch between YTD and QTD.

Jordy

Climber

Work smarter, not harder