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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count if two dates match.

Hi -

I am trying to count the number of (sales) deals in a given month for sales agents that were boarded in that month only.  I am using the MonthEnd function on both the sales agent boarding time stamp and the deal time stamp, then I am trying to say if the two dates are equal, count the deal.

Can someone send me a script to do this?

I tried

count({<[MonthEnd(Deal.ApprovalDate)] = ([MonthEnd(SalesAgent.DateCreated)])>}Deal.ID)

but this ends up counting the number of deals in two adjacent months, i.e, June & July when I only want June.

Thanks,

Mike

Labels (1)
2 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Should be like this

count({<Deal.ID = {"=Floor(MonthEnd(Deal.ApprovalDate))=Floor(MonthEnd(SalesAgent.DateCreated))"}>}Deal.ID)

Not applicable
Author

This returns no deals, 0.  Any other suggestions?