Data Preparation: Transforming and storing results

Hello hello!
So we have the following Challenge, each country collect information through ActivityInfo in different forms, su usally in a Wide format with a lot of columns for the many questions and indicators.

Is it possible to pivot the Wide format for a long format and actually store this so that it can then be accessed by API?
I know we can create calculated table for reports, but these are not accessible via API as it does not store the result

Hi @qwinisdoeffer_accion,

You can pivot the wide format data using the PIVOTLONGER function in a calculated table. Once the calculated table has been created, you can add the desired measures, columns and rows in a Pivot Table report, which you can save and query using the API.

To query a Pivot Table report via the API, use the following structure:
https://www.activityinfo.org/resources/reports/\[insert your report ID here]/rows

Let me know if this works for you.

Cheers,
Jeric

3 Likes

Great to know we can query a pivot table! I thought it was not stored, just computed :slight_smile:

Thank you for your answer!

1 Like

You’re most welcome. Glad to help!