Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to Fetch the count of records created prior to the selected date

Hi All

We have a requirement where we need to take the count of all those records which are having the creation date less than the selected Day,month,year.

User will be choosing the Year first , then month followed by the Day.

And the creation date will be in DD/MM/YYYY format.

Please let me know how this can be acheived.

Regards

4 Replies
alexandros17
Not applicable

Re: How to Fetch the count of records created prior to the selected date

use the makedate function and compare this to the creation date, count then the records (eventually add a new column to the table with value =1 and count this column)

jontydkpi
Not applicable

Re: How to Fetch the count of records created prior to the selected date

Hi

Lets assume for this explanation that the year, month and day are in variables vYear, vMonth and vDay and the creation date is the field CreationDate. Let's also assume that each row has a unique ID field called RowID and that the default date format is DD/MM/YYYY.

Then you could use:

Count({<CreationDate = {"<$(=MakeDate(vYear, vMonth, vDay))"}>} RowID)

If the default date format is not DD/MM/YYYY, then you will need:

Count({<CreationDate = {"<$(=Date(MakeDate(vYear, vMonth, vDay), 'DD/MM/YYYY'))"}>} RowID)

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable

Re: How to Fetch the count of records created prior to the selected date

Thanks Jonathan and Alexandros for the reply.

It worked

Regards

Bhupesh

Not applicable

Re: How to Fetch the count of records created prior to the selected date

Thanks Jonathan and Alexandros for the reply.

It worked

Regards

Bhupesh