Issues with aggregate data elements with aggregation type: last value

Hello Experts,

We have a weekly aggregate data set that collects a data element with aggregate type: last value (sum in org unit hierarchy). In our reports, we’re noticing that data is not appearing as expected.

First, is it possible to set the aggregation type of a data element to present the last value only for the reporting period that is being presented? For example, I have data only for w35 - w38 2020, were w38 has 0 entered for the value (‘store zero data values’ is set to true for dE). However, in my reports (see screenshot below) I’m seeing the last value from w37 presented for all following weeks and months (this ignores values that are 0 or null). I believe this is reported here already: Will this ticket be picked up at some point? Or is there another way to report the last value within the reporting period?

Second, it seems like data elements with the last value aggregation type are not respecting the ISO calendar. Using the same example explained above and screenshot below, I’m seeing w36 being presented as the last value for August. However, according to the ISO calendar, w35 aggregates to August and w36 aggregates to September. Is this expected behavior?

We are currently on version 2.33.4



Yes, we are seeing the same problem here (the 1st one), DEs with ‘Last value’ showing values to the end of 2020 which makes the graphs look incorrect.

This was posted on JIRA

Hi all,

I was investigating this issue, and I realized that this is not a bug.
It’s a configuration problem, and the following steps should help you to achieve what you’re looking for.

Assuming you’re logged into DHIS2 and have admin rights, please, execute the steps below in this order:

1) Go to the ‘Maintenance’ app;
1.1) Select the Data Element you need;
1.2) Check the box ‘Store zero data values’, as in the image DHIS_2_Maintenance-DE-Store_Zeros.png;

2) Go to the ‘Data Entry’ app;
2.1) Select your Data Element;
2.2) Select the date where you want to input ZERO;
2.3) Make this form ‘Incomplete’. See image DHIS_2_Data_Entry-Make_Incomplete.png;
2.4) Now, set ZERO to the respective field and click on ‘Complete’, as in the image DHIS_2_Data_Entry-Make_Complete_Again.png;

3) Go to the ‘System Settings’ app;
3.1) Go to the ‘Analytics’ tab;
3.2) Uncheck ‘Skip zero data values in analytics tables’. See image DHIS_2_Analytics_Do_NOT_Skip_Zeros.png;

4) Go to 'Data Administration’
4.1) Click on the ‘Maintenance’ tab;
4.2) Select ‘Clear application cache’;
4.3) Click on ‘PERFORM MAINTENANCE’, as in the image DHIS_2_Clean_App_Cache.png;

5) Open the ‘Browser Cache Cleaner’ app;
5.1) Click on ‘Select all’;
5.2) Click on ‘Clear’, and confirm with ‘Proceed’. See DHIS_2_Clean_Browser_Cache.png

6) Go to 'Data Administration’
6.1) Click on the ‘Analytics Tables’ tab;
6.2) Click on ‘START EXPORT’. See image DHIS_2_Data-Export_Analytics.png;

7) Finally, open the ‘Pivot Tables’ app;
7.1) Select the respective Data Element;
7.2) Set the ‘Periods’ to ‘Daily’;
7.3) Select the dates you want to test;
7.4) Uncheck the default period ‘Last 12 months’;
7.5) Select the correct ‘Org Unit.’;
7.6) Click on ‘Update’. You should see results similar to this image DHIS_2_Pivot_Tables-8607.png.

  • If you still see the same results in ‘Pivot Tables’ is very probable that your local browser is caching the requests.
    In this case, try to clean completely your local cache/data or disable the caching of your browser.

If you would like to learn more about ‘Skip zero data values in analytics tables’, see this topic of the user’s documentation: DHIS 2 User guide

For the Data Element configuration, you can find more at DHIS 2 User guide (item 14), and at DHIS 2 User guide, item 4).

I hope that helps you.


1 Like

Thanks for your assistance Dr.Ifeanyi @ifeanyiokoye!

@Kris_Reinhardt @dmnscar does this solve the issue? Please update us with your experiences! Thank you!

I think the thanks actually belongs to @maikel

Was only just conveying his good work…

Thanks @Gassim