Pivot Table excel downloaded file reordered columns/rows

Hi, there is one problem in 2.40.6 when I download an excel from Data Visualizer pivot table, it reorders my file columns and rows to alphabet, not in the style of my own.

Hi

Could you please explain how the change happens? Is it after you import the file into spreadsheet or before? Are you able to reproduce this issue in any of the play.dhis2.org instances.

Thanks!

Hi


Look at the above snapshot; there I have my own order for the first column. But when I download it to an Excel file, it changes the order to alphabetical. like the below snapshot.

1 Like

Same issue occured … is there any solution?

have you recievied any solution of this error in 2.40.6?

when I download an excel from Data Visualizer pivot table, it reorders my file columns and rows to alphabet, not in the style of my own which is showing on visualizer. is there any solution?

1 Like

Hi @ALI_HASSAN

You’re right. I am able to reproduce this in Data Visualizer app version v.100.9 (currently the latest version). I’ll ask to @dhis2-analytics team to see whether this is a bug or if retaining the column order is a feature request. After that I’ll let you know so we can create a feature request.

For now, the other option is to manually reorder the columns in a spreadsheet software.

I also have a question for you please. When I reproduced this issue, the columns were (ANC 2, ANC 3, ANC 1) so when they were reordered to (ANC1, ANC2, ANC3) it made more sense. Would you kindly share your use case where the alphabetical sorting doesn’t help?

Thank you!

I am currently working on the Tuberculosis indicator, and I’ve encountered an issue with the alphabetical sorting functionality. It is not working as expected, affecting our ability to download the data into Excel, similar to what is shown in the Data Visualizer. Could you please prioritize this issue and provide an update on the Data Visualizer application? Your assistance is greatly appreciated.

1 Like

In latest version of Data Visulaizer 101.0.0 issue not resolved yet…

1 Like

Thanks @ALI_HASSAN !

I’ve created a bug jira issue on your behalf and @Aminulhaq_SADAT, Jira

Please watch the ticket to receive updates about any changes/comments related to the ticket.

Thanks!

I am using DHIS2 version 2.39.8 and noticed that when I arrange the columns with Data Types in a specific order in the Pivot Tables of the Data Visualizer for better analysis, this order is lost when exporting the file to Excel.

Does anyone know if this is the expected system behavior, a possible bug in this DHIS2 version, or if there is a configuration that could fix this issue?

1 Like

Hi @cassamo

Thank you the clearly written post with the screenshots. This had been discussed here (Pivot Table excel downloaded file reordered columns/rows) and reported here (Jira)

Since the topics are the same, I will merge your post with the one that was posted first. Thanks!

Any update regarding this issue?

Dear All,

I’ve observed an issue with the recent update of DHIS2 from version 2.40.7. When arranging data elements in the Data Visualizer app, the order is maintained on-screen; however, upon downloading the data as Excel or CSV, the data elements or indicators are automatically re-sorted alphabetically. Some participants in my training sessions have raised concerns about this behavior. I also tested it on the DHIS2 demo site (play.dhis2.org) and noticed the same issue.

Could anyone advise on how this can be resolved?

1 Like

Hi all!

Thank you @Mr_jorge for raising this issue again and @ALI_HASSAN for your inquiry. The issue is planned to be fixed as indicated in the Jira ticket: DHIS2-19028 - Sorting of the Excel / CSV file when downloaded from Data Visualizer.

I’ve also triaged again to the team if there are any updates on this ticket. Thank you!

Dear All;
Can anybody help regarding the mentioned issue in the subject? We have been facing this issue since the last update, I guess in January 2025. Once the data is downloaded in Excel format, the system does not download the data in the defined format; instead, it downloads all data elements in Alphabetical order, and no more than 36 data elements are downloaded. We have developed a bundle of formats for data croiss verification and reporting, but due to this error, we are just stuck, and manual labor work has increased.
We were anticipating that this release would resolve the issue, and HISP Pakistan also mentioned this, but after the new release still the issue is still not fixed.

Can anybody help me out with how we can resolve this issue?

1 Like

Dear @jibransohail,

Happy to let you know that this issue is now fixed and will be released in the next patch versions of 2.39-42. You didn’t mention what version you are on but 2.39.10 and 2.42.1 should be released very soon for example. (DHIS2 Software Releases - DHIS2)

Best,
Karoline
DHIS2 Product Manager

1 Like