Table - Change some rows to columns

I’m using a data schema from Autodesk called forms-with-questions. https://help.autodesk.com/view/DOCS/ENU/?guid=Insight_Builder_Dataset_Schema


I would like a table with one row per filled out form. My issue is that question_index and answer are fields which become rows instead of columns. The result I’m after would have columns for each unique question_index and answers in the cells below. Can this be achieved with either a table or pivot table?

Hi @cbaze

Welcome to the Quick Sight community!

Could you please try using a Pivot Table in the analysis and add question_index to the Columns field and answer to the Values field. This should help transform the rows into columns and show one row per form with each answer in its respective question column.

Getting closer! How do I change this to show the actual answers rather than a count of them?

Hi @cbaze

In Pivot Tables, the Values section only accepts measures, not raw text fields. When you add a text field like answer, Quick Sight will automatically apply an aggregation such as count or distinct count.

You can create a calculated field to flag rows where the answer matches a specific value, and then use that flag in the Pivot Table and you can then sum this flag in the Values section to highlight the presence of a specific answer.

Example:

ifelse(contains({answer}, 'expected text'), 1, 0)

The answers I am tracking are numerical, but I need one row per filled out form. There are (5) questions on the form.

Hi @cbaze

The issue I see is that you’re counting the answers, not showing the actual numeric values submitted in the form.

Could you please set the aggregation for the answer field to Max or Min, since the answers are numerical.

Hi @cbaze,
It’s been awhile since we last heard from you on this thread, did you have any additional questions regarding your initial post or was the solution provided above helpful for your case?

Thank you,

Hi @cbaze,
Since we have not heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community.

Thank you!