Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
danielgargiulo
Partner
Partner

Count records within 30 days? I thought this would be easy....

Hi All,

In the dataset attached I would like to count the number of records from the NNPAC table that fell within 30 days of each unique record/ date in the NMDS table. See data attached. Tables are linked using 'Unique Patient ID'.

Please note the dummy data is only for one Person, in reality i want to do this for up to a million 'Unique Patient IDs'.

Your help and infinite wisdom is much appreciated.

Kind regards,

Daniel

6 Replies
Not applicable

count({<nmpac_date ={">=nmpac_date<=nmpac_date+30"}>}nmpac_date)

danielgargiulo
Partner
Partner

HI Ramkumar,

thank you for the reply. Unfortunately, this does not work as i need to use the date fields from the two different tables not just the one.

Thanks

Dan

Not applicable

From which date the 30 days count,means in NMDS table there are many dates available,so from which date the 30 days count.

danielgargiulo
Partner
Partner

The count needs to be repeated for each date in the NMDS table. The final straight table should have the fields:

Unique Patient ID, Event Start Date, [Count NNPAC Records within 30 days of Event start Date]

does that make sense?

Not applicable

may be this set analysis script will help you try this

=date(ceil(num(Date([Event Start Date],'dd/mm/yyyy')+30)),'DD-MM-YYYY')

danielgargiulo
Partner
Partner

thanks Bhawna. I dont think that will work as it needs to be counting the number of NNPAC records within 30 days of the NMDS date 'Event Start Date'.

thanks

dan