Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need help in set analysis

Hi Friends,

I need some help to achieve the below.

1. Count the number of ID if the Start Date is today's date.

2. Count the number of ID if the today's date is between Start Date and End Date.

I crashed my brain to achieve this. Need your help.

1 Solution

Accepted Solutions
sunny_talwar

Give this a shot:

=Count({<[Start Date] = {"$(=Date(Today(), 'MM-DD-YYYY'))"}>}ID)

View solution in original post

10 Replies
Bill_Britt
Former Employee
Former Employee

Hi,

Take a look at these Video's when you have time.

      - Beginners’ Introduction to Set Analysis

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
sunny_talwar

Try this:

  1. =Count({<[Start Date] = {"$(=Today())"}>}ID)
  2. =Count({<[Start Date] = {"<=$(=Today())"}, [End Date] = {">=$(=Today())"} >}ID)

Best,

Sunny

Anonymous
Not applicable
Author

Hi Sunny,

I tried Count({<[Start Date] = {"$(=Today())"}>}ID) and getting the count as 0. But I have 2 IDs with Start Date 28-Apr-2015.

What could be wrong...

sunny_talwar

Are you specifying a date format to your field [Start Date] in the script? Did the second expression work?

It would be easy if you can share a sample application.

Best,

Sunny

Anonymous
Not applicable
Author

Yes

Date(ScheduledStartDate,'MM-DD-YYYY') as 'Start Date'

This how I am getting the Start Date.

The second expression also did not work.. But for both the expression I am getting 0. (Not an error or -)

sunny_talwar

Give this a shot:

=Count({<[Start Date] = {"$(=Date(Today(), 'MM-DD-YYYY'))"}>}ID)

ankitaag
Partner - Creator III
Partner - Creator III

Please refer the attached application

ankitaag
Partner - Creator III
Partner - Creator III

Count({<[Start Date] = {"=$(=Today())"}>}ID)

Anonymous
Not applicable
Author

Thanks Sunny.. It worked perfect.