
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
count({<nmpac_date ={">=nmpac_date<=nmpac_date+30"}>}nmpac_date)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From which date the 30 days count,means in NMDS table there are many dates available,so from which date the 30 days count.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
