# Indicator

Hi!

I am trying to make an indicator that aggregates a dataelement over a month and divides it by the number of days in the last 3 months.

Does anybody have any advice?

Best regards,

Kenneth Børtveit

You can use the special paramater “D” which will give you the number of days in the period in question. Is this what you want to achieve?

Regards,

Jason

···

On Mon, Mar 31, 2014 at 8:13 AM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Hi!

I am trying to make an indicator that aggregates a dataelement over a month and divides it by the number of days in the last 3 months.

Does anybody have any advice?

Best regards,

Kenneth Børtveit

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

Alright, thank you. It solves the problem in a way.

I was looking for a way to define the indicator so that ‘D’ would allways be the last 3 months, is that possible?

···

2014-03-31 8:20 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

You can use the special paramater “D” which will give you the number of days in the period in question. Is this what you want to achieve?

Regards,

Jason

On Mon, Mar 31, 2014 at 8:13 AM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Hi!

I am trying to make an indicator that aggregates a dataelement over a month and divides it by the number of days in the last 3 months.

Does anybody have any advice?

Best regards,

Kenneth Børtveit

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

Actually we need to create an indicator that sums the data over the last 3 months and divides by 3 – e.g. average monthly consumption for the past 3 months.

Similarly we will need a function to average the number of cases of epidemic prone disease over the past 6 months and then check to see of the current months cases are > 2 Standard Deviations from the average.

I’m not sure if that is how the D function in the indicator definition screen does this.

Randy

···

Alright, thank you. It solves the problem in a way.

I was looking for a way to define the indicator so that ‘D’ would allways be the last 3 months, is that possible?

2014-03-31 8:20 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

You can use the special paramater “D” which will give you the number of days in the period in question. Is this what you want to achieve?

Regards,

Jason

On Mon, Mar 31, 2014 at 8:13 AM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Hi!

I am trying to make an indicator that aggregates a dataelement over a month and divides it by the number of days in the last 3 months.

Does anybody have any advice?

Best regards,

Kenneth Børtveit

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

eg. Indicator = ( Data Element / (D * 3) )

Here D indicates number of days in current month.

ie. if number of days in current month == 30

than or (D+D+D) or (D*3) will return 90

Similarly, if number of days in current month == 31

than or (D+D+D) or (D*3) will return 93

Similarly, if number of days in current month == 29 ( ie. in leap year )

than or (D+D+D) or (D*3) will return 87

In present scenario, there is no way to define the indicator so that ‘D’ would always be the last 3 months.

We can define indicator with addition (+) or multiplication (*) mathematical operators with combination

of ‘D’ for representing approx 3 months’ total days count, but not last three months’ total day count.

Keneeth, i think you are looking for D or mathematical expression with D such that it should return exactly last

three months’ total day count !

Regards

Brajesh Murari

P please consider the environment before printing this email

Alright, thank you. It solves the problem in a way.

I was looking for a way to define the indicator so that ‘D’ would allways be the last 3 months, is that possible?

···

On Monday, 31 March 2014 12:14 PM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

2014-03-31 8:20 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

You can use the special paramater “D” which will give you the number of days in the period in question. Is this what you want to achieve?

Regards,

Jason

On Mon, Mar 31, 2014 at 8:13 AM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Hi!

I am trying to make an indicator that aggregates a dataelement over a month and divides it by the number of days in the last 3 months.

Does anybody have any advice?

Best regards,

Kenneth Børtveit

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

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

Thank you Brajesh, that covers it.

···

2014-03-31 9:22 GMT+02:00 Brajesh Murari brajesh.murari@yahoo.com:

eg. Indicator = ( Data Element / (D * 3) )

Here D indicates number of days in current month.

ie. if number of days in current month == 30

than or (D+D+D) or (D*3) will return 90

Similarly, if number of days in current month == 31

than or (D+D+D) or (D*3) will return 93

Similarly, if number of days in current month == 29 ( ie. in leap year )

than or (D+D+D) or (D*3) will return 87

In present scenario, there is no way to define the indicator so that ‘D’ would always be the last 3 months.

We can define indicator with addition (+) or multiplication (*) mathematical operators with combination

of ‘D’ for representing approx 3 months’ total days count, but not last three months’ total day count.

Keneeth, i think you are looking for D or mathematical expression with D such that it should return exactly last

three months’ total day count !

Regards

Brajesh Murari

P please consider the environment before printing this email

On Monday, 31 March 2014 12:14 PM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Alright, thank you. It solves the problem in a way.

I was looking for a way to define the indicator so that ‘D’ would allways be the last 3 months, is that possible?

2014-03-31 8:20 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

You can use the special paramater “D” which will give you the number of days in the period in question. Is this what you want to achieve?

Regards,

Jason

On Mon, Mar 31, 2014 at 8:13 AM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Hi!

I am trying to make an indicator that aggregates a dataelement over a month and divides it by the number of days in the last 3 months.

Does anybody have any advice?

Best regards,

Kenneth Børtveit

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

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

Hi.

Just a minor clarification, in that “D” will return the current number of days in a given period, not necessarily a given month.

Lets say you collect data monthly. When you look at monthly aggregated data, the “D” will always equal to the number of days the month. However, if you look at aggregated quarterly data, then you will get “31+28+31” for quarter one as the denominator, and the aggregate total for the numerator (for instance).

So, if you collect your data quarterly, you will get the number of days in a quarter. However, if you collect your data monthly, and want the number of days in the preceding, current, and next months, then you will not be able to use “D”.

Regards,

Jason

···

On Mon, Mar 31, 2014 at 9:22 AM, Brajesh Murari brajesh.murari@yahoo.com wrote:

eg. Indicator = ( Data Element / (D * 3) )

Here D indicates number of days in current month.

ie. if number of days in current month == 30

than or (D+D+D) or (D*3) will return 90

Similarly, if number of days in current month == 31

than or (D+D+D) or (D*3) will return 93

Similarly, if number of days in current month == 29 ( ie. in leap year )

than or (D+D+D) or (D*3) will return 87

In present scenario, there is no way to define the indicator so that ‘D’ would always be the last 3 months.

We can define indicator with addition (+) or multiplication (*) mathematical operators with combination

of ‘D’ for representing approx 3 months’ total days count, but not last three months’ total day count.

Keneeth, i think you are looking for D or mathematical expression with D such that it should return exactly last

three months’ total day count !

Regards

Brajesh Murari

P please consider the environment before printing this email

On Monday, 31 March 2014 12:14 PM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Alright, thank you. It solves the problem in a way.

I was looking for a way to define the indicator so that ‘D’ would allways be the last 3 months, is that possible?

2014-03-31 8:20 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

You can use the special paramater “D” which will give you the number of days in the period in question. Is this what you want to achieve?

Regards,

Jason

On Mon, Mar 31, 2014 at 8:13 AM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Hi!

I am trying to make an indicator that aggregates a dataelement over a month and divides it by the number of days in the last 3 months.

Does anybody have any advice?

Best regards,

Kenneth Børtveit

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

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

Thank you, I was trying to get a grip on how ‘D’ works and how I could use it.

···

2014-03-31 10:01 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

Hi.

Just a minor clarification, in that “D” will return the current number of days in a given period, not necessarily a given month.

Lets say you collect data monthly. When you look at monthly aggregated data, the “D” will always equal to the number of days the month. However, if you look at aggregated quarterly data, then you will get “31+28+31” for quarter one as the denominator, and the aggregate total for the numerator (for instance).

So, if you collect your data quarterly, you will get the number of days in a quarter. However, if you collect your data monthly, and want the number of days in the preceding, current, and next months, then you will not be able to use “D”.

Regards,

Jason

On Mon, Mar 31, 2014 at 9:22 AM, Brajesh Murari brajesh.murari@yahoo.com wrote:

eg. Indicator = ( Data Element / (D * 3) )

Here D indicates number of days in current month.

ie. if number of days in current month == 30

than or (D+D+D) or (D*3) will return 90

Similarly, if number of days in current month == 31

than or (D+D+D) or (D*3) will return 93

Similarly, if number of days in current month == 29 ( ie. in leap year )

than or (D+D+D) or (D*3) will return 87

In present scenario, there is no way to define the indicator so that ‘D’ would always be the last 3 months.

We can define indicator with addition (+) or multiplication (*) mathematical operators with combination

of ‘D’ for representing approx 3 months’ total days count, but not last three months’ total day count.

Keneeth, i think you are looking for D or mathematical expression with D such that it should return exactly last

three months’ total day count !

Regards

Brajesh Murari

P please consider the environment before printing this email

On Monday, 31 March 2014 12:14 PM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Alright, thank you. It solves the problem in a way.

I was looking for a way to define the indicator so that ‘D’ would allways be the last 3 months, is that possible?

2014-03-31 8:20 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

You can use the special paramater “D” which will give you the number of days in the period in question. Is this what you want to achieve?

Regards,

Jason

On Mon, Mar 31, 2014 at 8:13 AM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Hi!

I am trying to make an indicator that aggregates a dataelement over a month and divides it by the number of days in the last 3 months.

Does anybody have any advice?

Best regards,

Kenneth Børtveit

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

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

Randy:
I think if we make the data element aggregation type = ‘average’ we can just select the period and we will have our result, given that the data element is collected monthly.

···

2014-03-31 10:08 GMT+02:00 Kenneth Børtveit kenneth.bortveit@gmail.com:

Thank you, I was trying to get a grip on how ‘D’ works and how I could use it.

2014-03-31 10:01 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

Hi.

Just a minor clarification, in that “D” will return the current number of days in a given period, not necessarily a given month.

Lets say you collect data monthly. When you look at monthly aggregated data, the “D” will always equal to the number of days the month. However, if you look at aggregated quarterly data, then you will get “31+28+31” for quarter one as the denominator, and the aggregate total for the numerator (for instance).

So, if you collect your data quarterly, you will get the number of days in a quarter. However, if you collect your data monthly, and want the number of days in the preceding, current, and next months, then you will not be able to use “D”.

Regards,

Jason

On Mon, Mar 31, 2014 at 9:22 AM, Brajesh Murari brajesh.murari@yahoo.com wrote:

eg. Indicator = ( Data Element / (D * 3) )

Here D indicates number of days in current month.

ie. if number of days in current month == 30

than or (D+D+D) or (D*3) will return 90

Similarly, if number of days in current month == 31

than or (D+D+D) or (D*3) will return 93

Similarly, if number of days in current month == 29 ( ie. in leap year )

than or (D+D+D) or (D*3) will return 87

In present scenario, there is no way to define the indicator so that ‘D’ would always be the last 3 months.

We can define indicator with addition (+) or multiplication (*) mathematical operators with combination

of ‘D’ for representing approx 3 months’ total days count, but not last three months’ total day count.

Keneeth, i think you are looking for D or mathematical expression with D such that it should return exactly last

three months’ total day count !

Regards

Brajesh Murari

P please consider the environment before printing this email

On Monday, 31 March 2014 12:14 PM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Alright, thank you. It solves the problem in a way.

I was looking for a way to define the indicator so that ‘D’ would allways be the last 3 months, is that possible?

2014-03-31 8:20 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

You can use the special paramater “D” which will give you the number of days in the period in question. Is this what you want to achieve?

Regards,

Jason

On Mon, Mar 31, 2014 at 8:13 AM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Hi!

I am trying to make an indicator that aggregates a dataelement over a month and divides it by the number of days in the last 3 months.

Does anybody have any advice?

Best regards,

Kenneth Børtveit

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

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

Hi Jason,

Can you elaborate and provide us little more info about “D” !

Say for example,

eg. Indicator = ( (“Data Element A” + “Data Element B”) / D )

Here data for “Data Element A” is collected monthly and data for " Data Element B" is collected

quarterly, than in this use case what would be the value for “D” in above indicator ?

Does its value would be total number of days in current monthly period or total

number of days in quarterly period !

Please elaborate little more about “D” because it is still not that much clear.

Regards

Brajesh Murari

P please consider the environment before printing this email

Thank you, I was trying to get a grip on how ‘D’ works and how I could use it.

···

On Monday, 31 March 2014 1:38 PM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

2014-03-31 10:01 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

Hi.

Just a minor clarification, in that “D” will return the current number of days in a given period, not necessarily a given month.

Lets say you collect data monthly. When you look at monthly aggregated data, the “D” will always equal to the number of days the month. However, if you look at aggregated quarterly data, then you will get “31+28+31” for quarter one as the denominator, and the aggregate total for the numerator (for instance).

So, if you collect your data quarterly, you will get the number of days in a quarter. However, if you collect your data monthly, and want the number of days in the preceding, current, and next months, then you will not be able to use “D”.

Regards,

Jason

On Mon, Mar 31, 2014 at 9:22 AM, Brajesh Murari brajesh.murari@yahoo.com wrote:

eg. Indicator = ( Data Element / (D * 3) )

Here D indicates number of days in current month.

ie. if number of days in current month == 30

than or (D+D+D) or (D*3) will return 90

Similarly, if number of days in current month == 31

than or (D+D+D) or (D*3) will return 93

Similarly, if number of days in current month == 29 ( ie. in leap year )

than or (D+D+D) or (D*3) will return 87

In present scenario, there is no way to define the indicator so that ‘D’ would always be the last 3
months.

We can define indicator with addition (+) or multiplication (*) mathematical operators with combination

of ‘D’ for representing approx 3 months’ total days count, but not last three months’ total day count.

Keneeth, i think you are looking for D or mathematical expression with D such that it should return exactly last

three months’ total day count !

Regards

Brajesh Murari

P please consider the environment before printing this email

On Monday, 31 March 2014 12:14 PM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Alright, thank you. It solves the problem in a way.

I was looking for a way to define the indicator so that ‘D’ would allways be the last 3 months, is that possible?

2014-03-31 8:20 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

You can use the special paramater “D” which will give you the number of days in the period in question. Is this what you want to achieve?

Regards,

Jason

On Mon, Mar 31, 2014 at 8:13 AM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Hi!

I am trying to make an indicator that aggregates a dataelement over a month and divides it by the number of days in the last 3 months.

Does anybody have any advice?

Best regards,

Kenneth Børtveit

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

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

My understanding is that ‘D’ is selected where you use the indicator.
It just counts the days in the period were we use the indicator.

···

2014-03-31 10:27 GMT+02:00 Brajesh Murari brajesh.murari@yahoo.com:

Hi Jason,

Can you elaborate and provide us little more info about “D” !

Say for example,

eg. Indicator = ( (“Data Element A” + “Data Element B”) / D )

Here data for “Data Element A” is collected monthly and data for " Data Element B" is collected

quarterly, than in this use case what would be the value for “D” in above indicator ?

Does its value would be total number of days in current monthly period or total

number of days in quarterly period !

Please elaborate little more about “D” because it is still not that much clear.

Regards

Brajesh Murari

P please consider the environment before printing this email

On Monday, 31 March 2014 1:38 PM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Thank you, I was trying to get a grip on how ‘D’ works and how I could use it.

2014-03-31 10:01 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

Hi.

Just a minor clarification, in that “D” will return the current number of days in a given period, not necessarily a given month.

Lets say you collect data monthly. When you look at monthly aggregated data, the “D” will always equal to the number of days the month. However, if you look at aggregated quarterly data, then you will get “31+28+31” for quarter one as the denominator, and the aggregate total for the numerator (for instance).

So, if you collect your data quarterly, you will get the number of days in a quarter. However, if you collect your data monthly, and want the number of days in the preceding, current, and next months, then you will not be able to use “D”.

Regards,

Jason

On Mon, Mar 31, 2014 at 9:22 AM, Brajesh Murari brajesh.murari@yahoo.com wrote:

eg. Indicator = ( Data Element / (D * 3) )

Here D indicates number of days in current month.

ie. if number of days in current month == 30

than or (D+D+D) or (D*3) will return 90

Similarly, if number of days in current month == 31

than or (D+D+D) or (D*3) will return 93

Similarly, if number of days in current month == 29 ( ie. in leap year )

than or (D+D+D) or (D*3) will return 87

In present scenario, there is no way to define the indicator so that ‘D’ would always be the last 3 months.

We can define indicator with addition (+) or multiplication (*) mathematical operators with combination

of ‘D’ for representing approx 3 months’ total days count, but not last three months’ total day count.

Keneeth, i think you are looking for D or mathematical expression with D such that it should return exactly last

three months’ total day count !

Regards

Brajesh Murari

P please consider the environment before printing this email

On Monday, 31 March 2014 12:14 PM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Alright, thank you. It solves the problem in a way.

I was looking for a way to define the indicator so that ‘D’ would allways be the last 3 months, is that possible?

2014-03-31 8:20 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

You can use the special paramater “D” which will give you the number of days in the period in question. Is this what you want to achieve?

Regards,

Jason

On Mon, Mar 31, 2014 at 8:13 AM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Hi!

I am trying to make an indicator that aggregates a dataelement over a month and divides it by the number of days in the last 3 months.

Does anybody have any advice?

Best regards,

Kenneth Børtveit

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

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

Hi Randy,

To me this sounds like the new surveillance type of validation rules is a better match.

Have you looked at that?

We would then somehow need to expose those formula values in the Web API somehow, so that they can be used in reports etc.

Ola

···
1. mars 2014 09:01 skrev “Wilson,Randy” rwilson@msh.org følgende:

Actually we need to create an indicator that sums the data over the last 3 months and divides by 3 – e.g. average monthly consumption for the past 3 months.

Similarly we will need a function to average the number of cases of epidemic prone disease over the past 6 months and then check to see of the current months cases are > 2 Standard Deviations from the average.

I’m not sure if that is how the D function in the indicator definition screen does this.

Randy

From: Dhis2-users [mailto:dhis2-users-bounces+rwilson=msh.org@lists.launchpad.net] On Behalf Of Kenneth Børtveit

Sent: Monday, March 31, 2014 8:44 AM

To: Jason Pickering

Subject: Re: [Dhis2-users] Indicator

Alright, thank you. It solves the problem in a way.

I was looking for a way to define the indicator so that ‘D’ would allways be the last 3 months, is that possible?

2014-03-31 8:20 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

You can use the special paramater “D” which will give you the number of days in the period in question. Is this what you want to achieve?

Regards,

Jason

On Mon, Mar 31, 2014 at 8:13 AM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Hi!

I am trying to make an indicator that aggregates a dataelement over a month and divides it by the number of days in the last 3 months.

Does anybody have any advice?

Best regards,

Kenneth Børtveit

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

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

Hi Randy and Kenneth,

Jason is correct above. If you need the average consumption you should use
the "average" aggregation operator.

Note that you can only have one aggregation operator defined per data
element. This becomes a problem if you usually want to see the sum of
consumption, but for a specific report you want to see the average
consumption.

In the analytics web api resource however, you can define the aggregation
operator in each query, meaning that you can override the data element
definition and set the aggregation type explicitly per query. This means
that you can create a report where you generate the average consumption
even if the data element definition is set up with a sum aggregation
operator.

Not sure how you generate your reports but you can e.g. make a HTML based
standard report using data from the analytics web api resource.
Documentation here:

http://www.dhis2.org/doc/snapshot/en/user/html/ch28s17.html

You can apply this query parameter to the analytics URL to set the
aggregation type:

&aggregationType=AVERAGE_INT

Your requirement for std dev is interesting and is something we've heard
from many people lately. I have now implemented support for this and
backported to 2.14 and 2.13 and triggered builds on CI. You can now do this:

&aggregationType=STDDEV

http://apps.dhis2.org/ci/

(This refers to the population based std dev)

regards,

Lars

I have a similar requirment, where the weekly disease trend this year needs to be compared to the average of the 3 previous years. I have done this with custom javascript but would be nice to have it available

···

On 31 Mar 2014 15:04, “Ola Hodne Titlestad” olati@ifi.uio.no wrote:

Hi Randy,

To me this sounds like the new surveillance type of validation rules is a better match.

Have you looked at that?

We would then somehow need to expose those formula values in the Web API somehow, so that they can be used in reports etc.

Ola

1. mars 2014 09:01 skrev “Wilson,Randy” rwilson@msh.org følgende:

Actually we need to create an indicator that sums the data over the last 3 months and divides by 3 – e.g. average monthly consumption for the past 3 months.

Similarly we will need a function to average the number of cases of epidemic prone disease over the past 6 months and then check to see of the current months cases are > 2 Standard Deviations from the average.

I’m not sure if that is how the D function in the indicator definition screen does this.

Randy

From: Dhis2-users [mailto:dhis2-users-bounces+rwilson=msh.org@lists.launchpad.net] On Behalf Of Kenneth Børtveit

Sent: Monday, March 31, 2014 8:44 AM

To: Jason Pickering

Subject: Re: [Dhis2-users] Indicator

Alright, thank you. It solves the problem in a way.

I was looking for a way to define the indicator so that ‘D’ would allways be the last 3 months, is that possible?

2014-03-31 8:20 GMT+02:00 Jason Pickering jason.p.pickering@gmail.com:

You can use the special paramater “D” which will give you the number of days in the period in question. Is this what you want to achieve?

Regards,

Jason

On Mon, Mar 31, 2014 at 8:13 AM, Kenneth Børtveit kenneth.bortveit@gmail.com wrote:

Hi!

I am trying to make an indicator that aggregates a dataelement over a month and divides it by the number of days in the last 3 months.

Does anybody have any advice?

Best regards,

Kenneth Børtveit

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

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

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

I have a similar requirment, where the weekly disease trend this year
needs to be compared to the average of the 3 previous years. I have done
this with custom javascript but would be nice to have it available

This would be what the surveillance validation rules do.

Agree with Ola that we could expose this in the web api and allow for more
input parameters.

···

On Mon, Mar 31, 2014 at 11:54 AM, Knut Staring <knutst@gmail.com> wrote:

On 31 Mar 2014 15:04, "Ola Hodne Titlestad" <olati@ifi.uio.no> wrote:

Hi Randy,

To me this sounds like the new surveillance type of validation rules is a
better match.

Have you looked at that?

We would then somehow need to expose those formula values in the Web API
somehow, so that they can be used in reports etc.

Ola
------
31. mars 2014 09:01 skrev "Wilson,Randy" <rwilson@msh.org> følgende:

Actually we need to create an indicator that sums the data over the
last 3 months and divides by 3 - e.g. average monthly consumption for the
past 3 months.

Similarly we will need a function to average the number of cases of
epidemic prone disease over the past 6 months and then check to see of the
current months cases are > 2 Standard Deviations from the average.

I'm not sure if that is how the D function in the indicator definition
screen does this.

Randy

*From:* Dhis2-users [mailto:dhis2-users-bounces+rwilson=
msh.org@lists.launchpad.net] *On Behalf Of *Kenneth Børtveit
*Sent:* Monday, March 31, 2014 8:44 AM
*To:* Jason Pickering
*Cc:* dhis2-users@lists.launchpad.net
*Subject:* Re: [Dhis2-users] Indicator

Alright, thank you. It solves the problem in a way.

I was looking for a way to define the indicator so that 'D' would
allways be the last 3 months, is that possible?

2014-03-31 8:20 GMT+02:00 Jason Pickering <jason.p.pickering@gmail.com>:

You can use the special paramater "D" which will give you the number of
days in the period in question. Is this what you want to achieve?

Regards,

Jason

On Mon, Mar 31, 2014 at 8:13 AM, Kenneth Børtveit < >>> kenneth.bortveit@gmail.com> wrote:

Hi!

I am trying to make an indicator that aggregates a dataelement over a
month and divides it by the number of days in the last 3 months.

Does anybody have any advice?

Best regards,

Kenneth Børtveit

_______________________________________________
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

_______________________________________________
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

_______________________________________________
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

_______________________________________________
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