Can we execute the current year Analytics

We want to visualize the current year’s data in a dashboard in real-time.
Can we execute the analytics “Last Year” as “0” then it will execute the current year analytics only by using this we can save the process time.

Kindly do the needful.

Hi @kandarpjoshi

When selecting “0” as the “number of last years of data to include” the analytics tables export will run the latest data (“where latest refers to the data which has been added, updated or removed since the last time the latest data or the full data was updated”).

Without a prior ‘full update’ latest data seems to fail when I tried to test this, so as I understand from the documentation that this option needs to happen after a recent ‘full update’ has been initiated.

This is explained in details here: Scheduling - Continuous analytics table

yesterday, I tried it with Last Year as “0”, by observing below analytic log enrolment data was missed…

- Validating Analytics Table VALIDATION_RESULT
- No validation results exist, not updating validation result analytics tables
- Validating Analytics Table ENROLLMENT
- Table updates ENROLLMENT
- Table updated aborted, no table or partitions to be updated
- Updating settings
- Invalidate analytics caches
- Analytics tables updated: 00:12:18.000

Will you pls help me to understand more in details?

1 Like

Thanks @kandarpjoshi! I’m asking @dhis2-analytics experts for their insights. :pray:

This should mean that there has been no new enrollments added/updated/deleted since the last time the analytics was run.

1 Like

It is not like we have Enrollment and Event data too. But In Scheduler I selected Last Year as “0”, because of we do not have any updated data for 2023 so changed it to “0”, so we can reduce the execution but it was not considered enrollment data.

No, that is not what this means. If you trigger analytics with years set to 0, only data which is considered to be “new” is considered. This means since the last time that analytics was run.

It is still not clear based on your messages that you think this is a bug related to the continuous analytics process. If you have already executed a full run of analytics and then you add additional enrollments, and then you execute a continuous analytics process (years = 0), and the new enrollments are not included, then that sounds like a bug to me. Is that what you are saying is happening?

Yes, actually I faced this… The enrolment count showed ZERO and event data was correct in the dashboard with Last Year as “0”.