Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Inna_Shnaiderman
Contributor III
Contributor III

Count rows in range of dates

Hi,

I have the following issue.

I need to count IDs in range of dates .

First  date should be start of fiscal month. Fiscal month is 21st day of the previous month. Meaning if now is January, start of fiscal month is 21/12/2020. The second date should be yesterday.

So it should be something like (count distinct  IDs where  date>=21st of the previous month and date<=today()-1). Can you please kindly help me on it? 

Thanks,

Inna

 

Labels (2)
1 Solution

Accepted Solutions
Inna_Shnaiderman
Contributor III
Contributor III
Author

Hi, I found an answer  , for the period till y-day it should be:

COUNT(DISTINCT{<Date= {">$(=Date(MonthStart(Today(),-1)+20,'MM/DD/YYYY'))"},


Date = {"<$(=Date((Today()-1),'MM/DD/YYYY'))"}>}ID)

View solution in original post

3 Replies
AdiPai
Creator II
Creator II

Hi , 

 

Try This

COUNT(DISTINCT{<Date = {">$(=Date(MonthStart(Today(),-1)+20,'DD/MM/YYYY'))"}>}ID)

Thanks

Adi

Inna_Shnaiderman
Contributor III
Contributor III
Author

Hi, can you please assist where is the part it is till yesterday ? 

Inna_Shnaiderman
Contributor III
Contributor III
Author

Hi, I found an answer  , for the period till y-day it should be:

COUNT(DISTINCT{<Date= {">$(=Date(MonthStart(Today(),-1)+20,'MM/DD/YYYY'))"},


Date = {"<$(=Date((Today()-1),'MM/DD/YYYY'))"}>}ID)