Discussion Board for collaboration on QlikView Layout & Visualizations.
I am wanting to create a text box that pops up only when a certain Year field is selected. For instance, when any date in 2017 is selected I want the text box to pop-up "Data as of 2016". When any date in 2016 is selected I want the text box to pop-up saying "Data as of 2015", etc. Is there a way to do this in the Show Conditional area in the Layout tab?
Maybe create a show conditional in your text box like
=GetSelectedCount( DateField) >0
And as expression for the text box itself:
=If(Only(Year(DateField)), 'Data as of ' & Only(Year(DateField))-1)
Thank you for your response.
So in the show conditional I put
=GetSelectedCount(Year) >0 ?
and on the General tab in the 'text' box I put
=If(Only(Year(Year)), 'Data as of ' & Only(Year(Year))-1) or should I remove one of those Years? Either way I get "-" as my result. I'm also not very familiar with the Only function...
You don't need to apply Year() function to a year field, this is only useful to calculate year number from a date number field.
=If(Only(Year), 'Data as of ' & Only(Year)-1)
In which field do you make your selections in? And how do your field values look like?