Robin, Unlikely that the "number of tracked entities" operator will work for programs defined as single events without registration, because that type of program does not have ANY entities.
A relatively simple work-around is to define one extra data element in your event - maybe called just "Event" - with a default value of 1. Adding those up will give you the number of events. We've been using Single Events for storing a range of survey data - every survey or sub-survey (questionnaire) is defined as a program. With the aggregation query builder (a) running against the raw event data value table and not the analytics event tables; and (b) inability to use a weighting factor on each case before aggregation, we (HISP-SA) have designed an app that filters a range of cases based on whatever criteria is relevant, multiplies the base value with a weighting factor if required, and then aggregates the (weighted) base value up to district or national level and inserts the aggregated records into the datavalues table. Since many indicators will require the number of cases as the denominator, it makes sense to have one "Event" or "Survey_Respondent" data element with number = 1 for all cases. So when calculating e.g. the indicator "Households with safe water rate", we can generate both the (weighted) total number of households in the survey and then filter all the households for specific criteria based on one or more "Household source of drinking water" and then aggregate that up (weighted) to form the numerator data. The app is still a bit crude, but I expect we will be able to polish it up and publish it to the library shortly. Regards calle On 21/01/2015, Robin Martens <mart...@sher.be> wrote: > Hi all, > > Is it possible in the Aggregation Query Builder to use the "Number of > tracked entities" operator to calculate a number of events, especially when > it concerns Single events without registration? > > I tried it and although it finds the events based on the conditions, it > always returns 0 as a value. > > Regards, > > Robin > -- ******************************************* Calle Hedberg 46D Alma Road, 7700 Rosebank, SOUTH AFRICA Tel/fax (home): +27-21-685-6472 Cell: +27-82-853-5352 Iridium SatPhone: +8816-315-19274 Email: calle.hedb...@gmail.com Skype: calle_hedberg ******************************************* _______________________________________________ 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