> For the complete documentation index, see [llms.txt](https://docs.ngsurvey.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ngsurvey.com/form-management/data-export/data-exports/csv-excel/questions-as-rows.md).

# Questions as Rows

Depending on the third party tools that you are using for analysis the default export output based on columns results in too much pre-processing to be able to analyze the data.

To allow an easier data analysis ngSurvey offers a way to pivot the data that you are exporting. Instead of organizing the data by columns it will organize the data per rows where each question will have its own row for each of the respondents.  Using such a format will enable you to easily group, filter the data to focus on the actual data analysis of the  the data that you have collected.

## ➡️ Data export file output samples

Using a survey with following questions and answers, you would be able to get a pivoted output of all the respondent data.&#x20;

<figure><img src="https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8fLhS0bmfBRyq0HdUm%2Fuploads%2FUS5C8fSWyO83Zqsd9bFJ%2Fimage.png?alt=media&amp;token=439a8e2a-2298-4c5d-88d4-afbd614b6ef8" alt=""><figcaption></figcaption></figure>

Here the pivoted view of the data were ngSurvey generates for each respondent a single row for each of the question and answer in the survey.

<figure><img src="https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8fLhS0bmfBRyq0HdUm%2Fuploads%2Fh4iSE5P3bhwjMa8iInkp%2Fimage.png?alt=media&amp;token=b2142b99-63c9-4471-839c-fc21f075b295" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ngsurvey.com/form-management/data-export/data-exports/csv-excel/questions-as-rows.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
