Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
IMPORTANT: Upcoming LEF Database Maintenance, Oct. 3rd - SEE DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Partner
Partner

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
Highlighted
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])?

 

 

Highlighted
Partner
Partner

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