Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics 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])

View solution in original post