Skip to main content
How do I manually flatten Results report data? (ARR)
Updated over a month ago

When using standard report universes in Apricot Results Reporting (ARR), your data by default is unflattened. This means that each element of the form you're reporting on is listed as a separate row in a table as opposed to having their own columns to display values. To learn more about flattened and unflattened data, click here.

It is possible to create a variable using a formula that manipulates an unflattened form field and displays its values as flattened data. In other words, you can turn a report table that has many rows to show a single participant's demographics into a table that displays all demographics in just one row per participant. Follow the steps listed below to learn how.

Step 1: Create a variable

A variable is any object created within the report, as opposed to objects that are generated based on the form fields brought into the report query. In our report, each field in the Participant Profile form is listed in a different row of the same Field Name column. The new variable will instead pull an individual form field into its own column of the table.

Click the '+ Add Variable' button on the right-hand panel to open the 'Create Variable window'.

Step 2: Enter the formula

Name your first variable after the form field you're isolating, then select Dimension as the qualification. Next, use the following formula in the text box:

  • = ([Record Text Values]) Where ([Field Name] = "Value") In ([Record ID])

Replace the word 'value' in the double quotation marks of the formula with the name of your field. Our first variable used the below formula:

  • = ([Record Text Values]) Where ([Field Name] = "Name") In ([Record ID])

Note: The field's name must have accurate spelling and capitalization. An easy way to prevent typos is to click on the Field Name object in the Objects panel under the Formula box, then double-click Values in the Operators panel.

This will generate a list of available values for the Field Name object; check the box next to the field you're looking for, then click OK to add it to the formula.

Click the green check mark to test that the formula you've entered is valid, then click OK to save your variable.

Step 3: Add the variable to the table

Under your list of available objects on the right panel, you'll now see a Variables section. Drag the variable you just created into your table to add the form field as its own column and display the specific values for each record.

Step 4: Duplicate the variable

Once you've confirmed your variable works as intended, you can create a separate variable for each field you want to use in your table as its own column. The most efficient way to achieve this is to copy the first variable and edit its name and formula to differentiate between form fields.
โ€‹

For example, the next demographic we pulled into our table as its own column was the Date of Birth field. Our next variable used the following formula:

  • = ([Record Text Values]) Where ([Field Name] = "Date of Birth") In ([Record ID])

Once you've duplicated the amount of variables you need for your report, you can drag and drop them into your table.

What else do you need help with?

Did this answer your question?