Skip to main content

Flexible Tables

Create Custom Data Tables with Advanced Filtering and grouping

Written by Carolina Almeida

πŸ’‘ What is a Flexible Table?

A Flexible Table is a configurable data visualization that lets you slice, group, and format clinical trial data. It works similar to a spreadsheet, but is automatically populated with data from Rivia rather than updated manually. This means the table stays up to date as more data is pulled into Rivia. You can configure it by defining columns that represent specific data points, including calculated fields using formulas for added flexibility and insight.

🎯 Goal

In this guide, you will learn how to use the core functionalities of Flexible Tables to quickly build custom, comprehensive, and insightful tables.

Step 1. Create from scratch a Flexible Table

Inside a dashboard, from the +Add Panel button, click on Flexible Table.

You can then select from one of our templates or Start from Scratch.

Step 2. Add Columns

You can add columns by clicking on the + sign in the header of the table.

Screen Recording 2026-05-06 at 09.01.00.mov [video-to-gif output image]

This will show you the type of columns you can add. The type determines where column data comes from:

Column Type

Source

Example

Event Data

A field from a clinical domain (Adverse Event, Laboratory, etc...)

Show Preferred Terms for the adverse events in the data

Patient Info

Subject demographics

Show the Age of the patients

Formula

A custom computed expression in spreadsheet-like format

IF(x.properties.value > 100, 'High', 'Low')

Manual

Manual Data added by the user

Leave a comment in the field

πŸ’‘Pro Tip!

Only Event Data columns determine which records are pulled into the table. Patient Info and Formula columns simply process data that is already there. As a result, if no Record Data columns are selected, Patient Info and Formula columns will not display any data.

Step 3. Add Data to your Column

After selecting your Event Data column, you will enter the column editor. Here, you can define the column name, choose the data domain, and select the property you want to display.

Screen Recording 2026-03-26 at 15.48.45.mov [video-to-gif output image]

Step 4. Filter your Column

The global table-level filters are accessible at the top of the Flexible Table editor, and allows you to filter out records altogether. Records that do not satisfy the filter will not be pulled into the table at all.

Screen Recording 2026-03-30 at 10.17.41.mov [video-to-gif output image]

Nevertheless, you can also filter a specific data column using the Data Filter. Column filtering is used to filter out values from the column alone, meaning that cells that don't match the filter will be blanked out, but records might still appear if these satisfy the global table-level filters.

Screen Recording 2026-03-27 at 09.17.32.mov [video-to-gif output image]

Step 5. Group the Data

With Flexible Tables, you can group records by any property or formula displayed in the columns you created. Records are bucketed by the column's data, such that records with the same data end up in the same group.

Screen Recording 2026-03-27 at 09.39.17.mov [video-to-gif output image]

After grouping you will see that aggregate values are computed in a group header row. By default, this will show the counts, however you can change the aggregation formula between maximum, average, and many more aggregation methods. This will be possible from the Column Editor > Aggregation.

Screen Recording 2026-03-27 at 09.46.34.mov [video-to-gif output image]

πŸ’‘Pro tip!

You can nest multiple grouping levels to create a hierarchy (e.g., SOC β†’ Preferred Term β†’ individual entries)

Step 6. Segment the Data Columns

Segmentation splits a single column into sub-columns. This is useful when you want to see the same measurement broken out by visit, category, or any other property. This will be possible from the Column Editor > Segmentation.

Screen Recording 2026-03-27 at 09.52.54.mov [video-to-gif output image]

Step 7. Sort the Table by Column Values

You can sort rows in Flexible Tables by:

  • Column values - sort the raw or computed cell values (e.g., to see earlier records first).

  • Aggregate values - sort group headers by their aggregated result (e.g., sort SOC groups by the most frequent).

Multiple sort levels are supported, and are applied in order.

Screen Recording 2026-03-27 at 09.58.23.mov [video-to-gif output image]

Step 8. Formatting and Display

You can use simple and conditional formatting on your columns to highlight interesting data or to display data in different formats. With format, you can transform:

  • Display templates: how a value is shown (e.g., display a date in your preferred format or truncate numbers to 2 decimal places). These are configured in the Column settings.

  • Conditional formatting: apply style rules (bold, color, background) when a condition is met (e.g., value > 100 β†’ red background). These are configured in the Column settings.

  • Row formatting: apply styles to the rows of the table for better readability (e.g., alternating row colors, different background color for header rows). This is configured from the global Settings button in the top right of the Flexible Table.

Screen Recording 2026-03-27 at 10.08.50.mov [video-to-gif output image]

Step 9. Formulas

Formulas are a lightweight expression language that allow you to perform custom computation on all of your data in real-time. Just edit one column and explore the formula syntax with our helper.

Screen Recording 2026-03-27 at 10.14.09.mov [video-to-gif output image]

Step 10. Manual Data Fields

Manual columns are editable, customizable individual fields. You can choose from four different field types:

  • Text: Freely enter any word or phrase

  • Checkbox: Mark each field with a check

  • Rating: Assign a rating from 0–5

  • Dropdown: Create custom options and select one from a dropdown menu

Screen Recording 2026-05-06 at 09.43.49.mov [video-to-gif output image]

πŸŽ‰ You’re all set!

You can now use our Flexible Tables!

ℹ️ Appendix: Technical Notes

Given a configuration of columns, the Flexible Table:

  • Pulls SDTM records according to the Record Data columns filterFormula and the global filters

  • Each record is processed to compile the cells of all columns according to their dataFormula and segmentFormula. This constitutes the record rows.

  • The rows are grouped based on the grouping fields according to their groupingFormula and the hierarchy is built, adding the group rows with aggregates that are computed according to the aggregationFormula.

  • Finally, when the records are being pulled to be displayed, we compute the displayFormat to show the cells.

Formulas are a domain-specific expression language evaluated on the backend. They have access to:

Variables:

  • x.domain, x.identifier, x.eventId, x.study - event metadata

  • x.properties.* β€” domain-specific event fields (e.g., x.properties.LBTEST)

  • x.subject.* β€” subject demographics (e.g., x.subject.age, x.subject.sex)

  • col['columnId'], agg['columnId'] - reference other columns' values or aggregates (for view filters, display templates)

Functions:

  • Logical: IF()

  • Cohort: IN_COHORT(), COHORT_COUNT()

  • Set: IN_SET(), NOT_IN_SET(), CONTAINS_ANY()

  • Transform: TRUNCATE_DECIMAL(), PARSE_DATE(), RANGE_SPLIT(), NTH_IN_ORDER()

  • Aggregation: COUNT(), SUM(), AVG(), MIN(), MAX(), COUNT_UNIQUE(), VARIANCE(), STDDEV()

Did this answer your question?