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: 
lernherk
Contributor
Contributor

Counting the number of records before an Expiration Date

Hi all, I have column called ExpirationDate that's in YYYY-MM-DD format. I am simply trying to create a measure for a gauge chart that will count all the records that have an ExpirationDate before today.  I've tried a number of things, but none of it seems to be working. Any help is appreciated.

Thanks!

1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

did you try something like below

count({<ExpirationDate={"<$(=Date(today(),'YYYY-MM-DD'))"}>}IDs)

 

p.s. ensure that the ExpirationDate column type is date

View solution in original post

2 Replies
alexpanjhc
Specialist
Specialist

Can you add a line in your script something like:

If ([expiration date]<today(),1 ,0) as [Expired Counts]

in your measure, count( [Expired Counts])?

 

 

dplr-rn
Partner - Master III
Partner - Master III

did you try something like below

count({<ExpirationDate={"<$(=Date(today(),'YYYY-MM-DD'))"}>}IDs)

 

p.s. ensure that the ExpirationDate column type is date