Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
vijetas42
Specialist
Specialist

List box expression

Hi All,

My requirement is, Currently I am having year values in dimension as 2010 to 2020 but, in my fact tables data is present only for 2014 and 2015 for that i want to show only year values for those data is present without hard coding .How to achieve this.

3 Replies
swuehl
MVP
MVP

Assuming a Fact field like Sales, try something like

=aggr( only({<Sales = {"*"}>} Year), Year)

as list box field expression.

vijetas42
Specialist
Specialist
Author

Hey,

Thanks for your reply.It's working fine but,can you tell me what is meaning of this expression only({<Sales = {"*"}>} Year)

swuehl
MVP
MVP

{<Sales = {"*"} >} is a set expression.

It's filtering records for which a Sales record ( of any value, "*" is a wildcard search) is existing. So only SalesDates / Years which appear in the fact table should be returned.