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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
m4u
Partner - Creator II
Partner - Creator II

Month and Year functions

hi all,

why when creating a list based on this expression "year(doc_date)" or "month(doc_date)"- selecting one of the values works, but the selected value appears white (not green)?

thanks

shlomo

5 Replies
parpatra
Partner - Contributor III
Partner - Contributor III

i am not 100 % sure...but may be because there is more than one year of data present and there is not one-one relationship,

johnw
Champion III
Champion III

When you use year(doc_date) as a list box expression, you are selecting all of the individual doc_dates. You can see this if you also have a list box for doc_date, or if you add a current selections object. I strongly suggest creating a calendar table with doc_year, doc_month, and whatever else you might need. Use the real fields from the calendar instead of list box expressions.

m4u
Partner - Creator II
Partner - Creator II
Author

Thank you john,

how could i create a calendar table?

shlomo

m4u
Partner - Creator II
Partner - Creator II
Author

Thank you john,

how could i create a calendar table?

i'm loading my data from sql-server, i can add those fields to my sql server selection (using sql functions) there is a better way?

shlomo

Miguel_Angel_Baeyens

Hello Shlomo,

Use the information and code examples in this post.

Hope this helps.