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: 
jakobjensen
Contributor II
Contributor II

Count distinct dates greater than a given date

Say I want to count the number of distinct dates that have been within the last 365 days. I wrote the following meassure

count({<[orderdate.autoCalendar.Date]={">Date([orderdate.autoCalendar.Date]-365)"}>},  distinct [orderdate.autoCalendar.Date])

but that just returns "0"

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

count({<[orderdate.autoCalendar.Date]={">$(=Date([orderdate.autoCalendar.Date]-365))"}>}  distinct [orderdate.autoCalendar.Date])

View solution in original post

1 Reply
tresesco
MVP
MVP

Try like:

count({<[orderdate.autoCalendar.Date]={">$(=Date([orderdate.autoCalendar.Date]-365))"}>}  distinct [orderdate.autoCalendar.Date])