Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to display data between two dates

Hi,

I have two date fields like CN_EDT(contracts start date) and CN_XDT(contracts end date).I have an agent and year filters. If I select one agent and year it has to display number of contracts has done by an agent in that year between these two dates.

Please help me to solve this

Thanks in advance

Anusha K

6 Replies
timanshu
Creator III
Creator III

if(Year([contracts start date]) = Year and year( [contracts end date] )= Year, Count( Contracts))

avinashelite

create two variables to read the start and end date,

then try like this:

count({<Calender_Date={">=$(=Date(vStartDate,'MM/DD/YYYY'))<=$(=Date(vEndDate,'MM/DD/YYYY'))"}>}contract )

amit_saini
Master III
Master III

Hi Anusha,

See the attachment.

Thanks,

AS

Not applicable
Author

Try

count({<agent,year,date_field={'>$(=[contracts start date]) <= $([contracts end date])'}>}contracts)

prajapatiamar38
Creator II
Creator II

Hi,

Try this one I hope it will work...Don't directly Copy paste this.Modify it according to your requirement.

=count({<Date={>=CN_EDT<=CN_XDT},Agent=$::Agent,Year=$::Year>}contracts)

Not applicable
Author

Use Set Analysis as suggested by other community members, but keep in mind the Date Format of all comparison dates must be of same format.