Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
anonymous1
Contributor III
Contributor III

Expression to determine expiry date

hi everyone, 

im trying to create a table that will tell me the total amount of upcoming expired items.  so i have a list of all my items with the expiry dates, and i only want the table to output the items that will be approaching the expiry date within the month.  i have:

if ([EXPIRY_DATE] <= DATE(NOW())+30, count({1}ITEM))

any ideas why this is giving me nothing at all? 

regards

Labels (2)
2 Replies
Vegar
MVP
MVP

It is probably due to the granuarlity of your expression. You need to have only one EXPIRY_DATE per row in order to get this expression to work,

An alternative calculation is this: 

=count({<EXPIRY_DATE *= {"<=$(=dayname(now(),30))"}>}ITEM)
Brett_Bleess
Former Employee
Former Employee

Did Vegar's post help you resolve the issue?  If so, please be sure to click the Accept as Solution button to give him credit for helping you out.  If it did not resolve, please either post additional information or post what you did to fix it, and if the latter, you can then mark that post as the solution as well, just FYI.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.