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

Count if Set Analytics Dual Criteria for Records closed in current month

Hi, I am trying to create a formula that will count specific records in a data set.

The records counted should meet the following criteria:

- [DateClosed] is within the current month.

- [Project] is = 'Yellow' or 'Green' or 'Blue'

This is the formula I have but, for some reason I don't understand, its counting every record using the first [DateClosed] criteria but not applying the [Project] criteria:

=num(Count({<DateClosed = {"$(='>=' & Date(MonthStart(Today())) & '<=' & Date(MonthEnd(Today())))"},

project = {'Yellow', 'Green','Blue'}>} RecordID),'#,##0', '.' , ',' )

1 Solution

Accepted Solutions
avkeep01
Partner - Specialist
Partner - Specialist

Hi Erika,

Just to be sure: check if it should be project or Project. you wrote them in different ways.

View solution in original post

4 Replies
avkeep01
Partner - Specialist
Partner - Specialist

Hi Erika,

Just to be sure: check if it should be project or Project. you wrote them in different ways.

leale1997
Contributor III
Contributor III
Author

Ah Ha!!!

And so the question is answered.  Thirty minutes beating my head against the desk because I left out the capital letter 'P'.  Who knew??

Thanks so much for being my second set of eyes on this... 

If I wanted to add a third criteria, would something like this work:

=num(Count({<DateClosed = {"$(='>=' & Date(MonthStart(Today())) & '<=' & Date(MonthEnd(Today())))"},

Project = {'Yellow', 'Green','Blue'}>}, Division = {'Americas', 'UK', 'Asia'} RecordID),'#,##0', '.' , ',' )

avkeep01
Partner - Specialist
Partner - Specialist

Almost only the <] should be after the division part instead of the project part.

leale1997
Contributor III
Contributor III
Author

Got it!  That's working perfectly.  Thanks!