Output Raw Data in a matrix format -- DHIS2 2.24

Dear Community,

With DHIS2 2.24, I am trying to output raw data in a matrix format. I have used SQL View to output the data. Data values table is presented as following:

orgUnit UID, dataElement1, Value, Period

orgUnit UID, dataElement2, Value, Period

orgUnit UID, dataElement3, Value, Period

orgUnit UID, dataElement4, Value, Period

I would like to output “raw data” for each orgUnit as following:

orgUnit UID, dataElement1, Value, dataElement2, Value, dataElement3, Value, dataElement4, Value, Period

I have used pivot tables , but it is each time doing data agregation of the dataElement.

I would like to have your support for the SQL code that I should run to obtain this result.

With Kind Regards,

This message and its attachments are confidential and solely for the intended recipients. If received in error, please delete them and notify the sender via reply e-mail immediately.