Aggregate date by range (tracker model)

Hi all,

I'm quite new to dhis2, and still learning it. I'm using dhis v2.17.

I'm working with the tracker model, I have created a program (single event
without registration) and I'm creating a report from my events that shows
aggregated values. This works.

BUT, in my event capture, I fill a data element called 'Date of birth' (with
type Date), and in my report I would like these values aggregated by range
(0 to 5 years; 5 to 10 years; ...).
Is that possible?

Best regards,

Yoann MIRA - SOLUTIONS ENGINEER
NOVEL-T Sàrl

Hi Yoann,

I think you can define an aggregate formula for 0-5 years as follows:

DATEDIFF(executionDate , [DE:x.y.z] ) >= 0 and DATEDIFF(executionDate **, **[DE:x.y.z] ) <= 1825

In which:

x : The id of program

y : The id of Program stage

z : The id of “Date of birth” data element

1825 : 5 years ( 5 * 365 )

I hope it is useful.

Best regards,

Tran Chau

···

On Mon, Jan 12, 2015 at 11:11 PM, Yoann Mira ym@novel-t.ch wrote:

Hi all,

I’m quite new to dhis2, and still learning it. I’m using dhis v2.17.

I’m working with the tracker model, I have created a program (single event

without registration) and I’m creating a report from my events that shows

aggregated values. This works.

BUT, in my event capture, I fill a data element called ‘Date of birth’ (with

type Date), and in my report I would like these values aggregated by range

(0 to 5 years; 5 to 10 years; …).

Is that possible?

Best regards,

Yoann MIRA - SOLUTIONS ENGINEER

NOVEL-T Sàrl


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Yes, it worked as you said.

Thanks for your help!

**Novel-**T Sàrl

Yoann MIRA - Solutions Engineer

W: www.novel-t.ch | @: ym@novel-t.ch

···

From: cthutran@gmail.com [mailto:cthutran@gmail.com] On Behalf Of Tran Chau (HISP Vietnam)
Sent: mercredi 14 janvier 2015 16:15
To: Yoann Mira
Cc: dhis2-users@lists.launchpad.net
Subject: Re: [Dhis2-users] Aggregate date by range (tracker model)

Hi Yoann,

I think you can define an aggregate formula for 0-5 years as follows:

DATEDIFF(executionDate , [DE:x.y.z] ) >= 0 and DATEDIFF(executionDate **, **[DE:x.y.z] ) <= 1825

In which:

x : The id of program

y : The id of Program stage

z : The id of “Date of birth” data element

1825 : 5 years ( 5 * 365 )

I hope it is useful.

Best regards,

Tran Chau

On Mon, Jan 12, 2015 at 11:11 PM, Yoann Mira ym@novel-t.ch wrote:

Hi all,

I’m quite new to dhis2, and still learning it. I’m using dhis v2.17.

I’m working with the tracker model, I have created a program (single event
without registration) and I’m creating a report from my events that shows
aggregated values. This works.

BUT, in my event capture, I fill a data element called ‘Date of birth’ (with
type Date), and in my report I would like these values aggregated by range
(0 to 5 years; 5 to 10 years; …).
Is that possible?

Best regards,

Yoann MIRA - SOLUTIONS ENGINEER
NOVEL-T Sàrl


Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp