Hi Lars,

I have created an indicator “Number of days equipment not working” where i am using “D” mathematical operator as “Number of Days”

Number of days equipment not working

= [ {(Total Number of days in current month) - (Number of days equipment working)}/1 ]

ie.

Number of days equipment not working

= [ {[Number of days] - (Number of days equipment working)}/1 ]

And i am using this indicator as a calculated data element in a data set.

When, i am entering value for data element “Number of days equipment working” = 24

The value for indicator “Number of days equipment not working” comes with = -24

Similarly, i am entering value for data element “Number of days equipment working” = 26

The value for indicator “Number of days equipment not working” comes with = -26

Means, it indicates [Number of days] is always returning value = 0 in above formula with monthly period selection.

I am looking if i could use “D” ie. [Number of days] mathematical operator could return total number of days in current monthly period.

Or does it only work for quarterly and yearly period type not for monthly period type ?

Or is there some bug associated with [Number of days] while creating indicators ?

Regards

Brajesh Murari

Hi Jason,

It means, if we will use “D” in indicator given below

Number of days equipment not working

= [ {(Total Number of days in current month) - (Number of days equipment working)}/1 ]

ie.

Number of days equipment not working

= [ {(D) - (Number of days equipment working)}/1 ]

And if we provide input " Number of days equipment working" = 25 and aggregation level monthly, than it

should return with value of indicator ie. “Number of days equipment not working” = 5 for all months in a financial year !

Means, in monthly aggregation level selection or monthly period type selection, DHIS2 will always return value of “D” = 30, irrespective of months would be January or February or March or April or December ! for every month value of “D” = 30.

Is that true Jason !

Regards

Brajesh Murari

Hi Brajesh,

I think this is exactly what Lars is getting at. In fact, the numerator must be “Total number of days in current period” not total number of days this month.

For example, maybe “Number of days equipment working” has values of 20,25,and 28 for Jan, Feb and March. When you

aggregegate the data to Quarter 1, these values would need to be added together to get 73 working days. The “D” value is always going to give you the total days in the period of interest, so in this case, it would be 31+28+31=90. Thus, in your example, the numerator would be (for a quarter)

90 - 73 and your denominator would be 73, which would end up being 18.8% (which I guess is actually a percentage of downtime in this case).

Best regards,

Jason

## ···

On Tuesday, 11 February 2014 3:30 PM, Brajesh Murari brajesh.murari@yahoo.com wrote:

On Tuesday, 11 February 2014 2:53 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

On Tue, Feb 11, 2014 at 10:25 AM, Brajesh Murari brajesh.murari@yahoo.com wrote:

Hi Lars,

I am in process of creating an indicator say for example

Number of days equipment not working

= [ {(Total Number of days in current month) - (Number of days equipment working)}/1 ]

Here nominator is defined as an mathematical expression

[ {(Total Number of days in current month) - (Number of days equipment working)}]

And here denominator is 1 and “Number of days equipment working” is an aggregated data element.

My query is how i can use mathematical operator “D” in above nominator for calculating

“Total Number of days in current month” which is not a data element in expression given below ie.

[ {(Total Number of days in current month) - (Number of days equipment working)}]

Or, is there any other way to calculate or use “Total number of days in current month” while making indicator specially

since it is a variable and varies month to month, say for example in Fab its value will be 28 or 29, in March its value will be 31, in April its value will be 30 etc.

Please clarify how we can make indicator like above and how we can use “Total number of days in current month” which is not a data element ?

Regards

Brajesh Murari

Brajesh Murari

On Tuesday, 11 February 2014 1:09 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi Brajesh,

it indicates the number of days in the

aggregation period. So if you ask for the aggregate value for a quarter, it will return 92 (or 91). You can then use this to calculate things like average number of something per day.

regards,

Lars

On Tue, Feb 11, 2014 at 8:06 AM, Brajesh Murari brajesh.murari@yahoo.com wrote:

Hello List

I have a very simple query regarding making of new indicator formula in DHIS2.

When we use to define numerator and denumerator, we often found a series

mathematical operators like (,),+,-,*,/ and D

My queries is what this D indicates here !

When we put courser on D, tool tips comes with “Number of Days”,

does it indicates total number of days in current month !

Please clarify.

Regards

Brajesh Murari

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

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

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

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

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

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

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

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