Re: [Dhis2-devs] [Dhis2-users] DHIS2 - Averaging over orgunits

2014-09-24 Thread Adebusoye Anifalaje
Hi Bob, I do not suppose you could use this statement in the sqlview since that’s limited to Select statements. I recall Jason mentioned that the only way they are able to manage a WASH Program needing just the last current value is to dump the data and post updates though the web api. This

Re: [Dhis2-devs] [Dhis2-users] DHIS2 - Averaging over orgunits

2014-09-24 Thread Rodolfo Melia
Or have it as part of the aggregator operators... That's the dream Rodolfo Meliá +44 777 576 4090 | +1 708 872-7636 Please ignore any typos on this email sent from my mobile, probably written while I was at the park with the kids, at the airport walking to the gate, or sleepless (although

Re: [Dhis2-devs] [Dhis2-users] DHIS2 - Averaging over orgunits

2014-09-24 Thread Bob Jolliffe
You could install the function into the database through the postgres backend. Then you can include the function into select statements. For example: select organisationunit.name, getLatestPopulation( organisationunit.organisationunitid).value from organisationunit; On 24 September 2014 10:22,

Re: [Dhis2-devs] [Dhis2-users] DHIS2 - Averaging over orgunits

2014-09-24 Thread Adebusoye Anifalaje
Thank you Bob. I guess if Rodolfo’s dream doesn’t come true, then this would be the next best solution. Cheers. Busoye On 24 Sep 2014, at 11:03, Bob Jolliffe bobjolli...@gmail.com wrote: You could install the function into the database through the postgres backend. Then you can include

Re: [Dhis2-devs] [Dhis2-users] DHIS2 - Averaging over orgunits

2014-09-24 Thread Rodolfo Melia
The problem with that approach is that the function is not available on Pivot Tables or Event Visualizer, where people need it.. Anyway, nice to know that you can call it via the SQL views. *Rodolfo Meliá* *Principal | *rme...@knowming.com Skype: rod.melia | +44 777 576 4090 | +1 708 872

Re: [Dhis2-devs] [Dhis2-users] DHIS2 - Averaging over orgunits

2014-09-24 Thread Bob Jolliffe
I do agree its not the final solution. Just thought I'd share as a useful hack/workaround for some problems. I am no sql wizard, so was quite pleased with myself that this worked :-) On 24 September 2014 11:26, Rodolfo Melia rme...@knowming.com wrote: The problem with that approach is that