> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nextedy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Calculated Columns Missing in Exports

> Resolve empty or inconsistent calculated column values in Excel and PDF exports, particularly for imported work items.

export const LastReviewed = ({date}) => {
  if (!date) return null;
  const formatted = new Date(`${date}T00:00:00Z`).toLocaleDateString("en-US", {
    year: "numeric",
    month: "long",
    day: "numeric",
    timeZone: "UTC"
  });
  return <p className="mt-10 text-sm text-gray-400 dark:text-zinc-500 not-prose">
      Last reviewed on {formatted}
    </p>;
};

## Symptoms

Calculated columns (columns with a `formula` property) display correct values in the Nextedy RISKSHEET grid but appear empty or inconsistent in exports. This affects both Excel and PDF output.

<Frame>
  <img src="https://mintcdn.com/none-17b4493f/t34k0QhMnn4JCqkc/risksheet/diagrams/troubleshooting/calculated-columns-export/diagram-1.svg?fit=max&auto=format&n=t34k0QhMnn4JCqkc&q=85&s=769db55c9f7550678e764f0103a53d7c" alt="diagram" style={{ maxWidth: "680px", width: "100%" }} width="680" height="250" data-path="risksheet/diagrams/troubleshooting/calculated-columns-export/diagram-1.svg" />
</Frame>

<Warning title="Imported items have empty calculated values">
  Items imported into Polarion via scripts or bulk import do not trigger Risksheet formula execution. The calculated column values are not stored in Polarion fields until the item is edited in Risksheet. Exports read field values from Polarion, so they show empty cells for these items.
</Warning>

## Fix: Sync Formula Values (v24.5.1+)

Risksheet version 24.5.1 introduced a data sync feature for formula columns that ensures calculated values are stored to Polarion fields.

1. Update Risksheet to version **24.5.1** or later
2. Open the affected Risksheet document
3. The data sync feature automatically persists formula column values to Polarion fields

For older versions, the workaround is to manually edit each affected item in Risksheet to trigger formula execution and value persistence.

<Tip title="Version 24.5.1 data sync">
  Starting with version 24.5.1, Risksheet automatically syncs formula column values to Polarion fields, resolving the empty export issue for both new and imported items.
</Tip>

## Fix: Formulas Not Executing for Hidden Columns

Formulas only execute when their column is **visible** in the sheet. If a formula column is hidden, its value is not calculated and will not appear in exports.

1. Check if the formula column is hidden in your current view
2. Use **saved views** rather than hidden columns for export-specific layouts
3. Ensure the formula column is visible when the sheet loads

```yaml theme={null}
views:
- name: Export View
  columnIds:
  - id
  - title
  - severity
  - occurrence
  - rpn
  - rpnNew
- name: Editing View
  columnIds:
  - id
  - title
  - severity
  - occurrence
  - detection
  - rpn
  - mitigation
  - rpnNew
```

<Warning title="Never set export view as default">
  Do not set an export-specific saved view as the default view. Formulas run on sheet load, and a restricted column set may prevent dependent formulas from executing. Keep the full-column view as the default.
</Warning>

## Verify Formula Configuration

Confirm your formula columns are properly configured in sheet configuration:

```yaml theme={null}
columns:
  - id: rpn
    header: RPN
    bindings: rpn
    formula: commonRpn
    readOnly: true
formulas:
  commonRpn: "function(info){ var value = info.item['occ']*info.item['det']*info.item['sev']; return value?value:null;}"
```

Key points to verify:

| Property   | Expected Value                        | Notes                                    |
| ---------- | ------------------------------------- | ---------------------------------------- |
| `formula`  | References a key in `formulas`        | Must match exactly                       |
| `readOnly` | `true` (auto-set for formula columns) | Formula columns are read-only by default |
| `visible`  | Must be `true` at sheet load time     | Hidden formula columns do not execute    |

## Check Export Column Types

Different column types produce different output formats. Verify that your formula column values match the expected export format:

| Column Type                    | Excel Output                  | PDF Output                    |
| ------------------------------ | ----------------------------- | ----------------------------- |
| Numeric formulas (RPN, scores) | Number values                 | Formatted numbers             |
| String formulas                | Plain text                    | Plain text                    |
| Boolean columns                | `true` or `false` text        | `true` or `false` text        |
| Multi-enum columns             | Comma-separated display names | Comma-separated display names |
| Item link columns              | Plain text (HTML stripped)    | Label text                    |
| Server-rendered columns        | Plain text with line breaks   | Plain text (HTML stripped)    |

## Verification

After applying the resolution:

1. Open the Risksheet document and verify calculated columns display correct values in the grid
2. Export to Excel and confirm the formula column values appear in the exported file
3. Check both imported items and manually edited items to ensure consistent values

You should now see all calculated column values correctly populated in both Excel and PDF exports, including items that were originally imported via scripts or bulk operations.

## See Also

* [Export Performance Issues](/risksheet/troubleshooting/export-performance) -- slow exports and optimization
* [Rendering and Display Errors](/risksheet/troubleshooting/rendering-errors) -- grid display problems
* [Date Column Save Errors](/risksheet/troubleshooting/date-column-save-errors) -- date field persistence issues

<LastReviewed date="2026-06-18" />
