> ## 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.

# Query Baseline or Revision

> View Nextedy POWERSHEET data at a specific historical baseline or revision in Siemens Polarion ALM, enabling point-in-time analysis of requirements and traceability matrices.

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>;
};

## Prerequisites

* A Polarion project with at least one baseline created
* A working powersheet document with configured data sources
* Understanding of Polarion baselines (project-level snapshots)

## Step 1: Open a Document in Revision Mode via the UI

The simplest way to view historical data is through the Powersheet **History** menu:

1. Open the powersheet document in Polarion
2. Navigate to the **History** menu group in the toolbar
3. Select the desired baseline or revision number
4. The document reloads with historical data

<Note>
  When viewing a document in revision mode, the sheet is automatically set to read-only. You cannot edit work items while viewing historical data.
</Note>

## Step 2: Open a Revision via URL Parameter

You can link directly to a specific revision by appending the `revision` parameter to the Powersheet URL:

```text theme={null}
/polarion/#/project/myProject/powersheet?document=Folder/DocName&revision=42
```

| Parameter  | Value        | Description                      |
| ---------- | ------------ | -------------------------------- |
| `revision` | Integer >= 0 | Specific revision number to view |
| (omitted)  | --           | Shows latest (HEAD) data         |

<Frame>
  <img src="https://mintcdn.com/none-17b4493f/-WiVljKlDztH36bB/powersheet/diagrams/guides/queries/query-baseline-revision/diagram-1.svg?fit=max&auto=format&n=-WiVljKlDztH36bB&q=85&s=e28d36e7e9b489cb5183a777c0c9da0e" alt="diagram" style={{ width: "520px", maxWidth: "100%" }} width="520" height="140" data-path="powersheet/diagrams/guides/queries/query-baseline-revision/diagram-1.svg" />
</Frame>

<Tip>
  The revision URL parameter enables bookmarking and sharing specific historical snapshots. Share the full URL with team members for audit reviews or milestone comparisons.
</Tip>

## Step 3: Return to Current Data

To exit revision mode and return to the live document:

1. Open the **History** menu
2. Select **Close Revision** (or the equivalent option to return to HEAD)
3. The document reloads with current data and editing is re-enabled

Alternatively, remove the `revision` parameter from the URL and reload.

## Step 4: Create a Baseline in Polarion

Baselines are created in Polarion, not in Powersheet. Each baseline captures a project-wide snapshot that Powersheet can reference by revision number:

1. In Polarion, navigate to your project
2. Go to **Administration > Baselines** (or the equivalent baseline management page)
3. Create a new baseline
4. Note the revision number assigned to the baseline

<Info>
  The exact steps for creating baselines may vary depending on your Polarion version and project configuration. Consult your Polarion administrator for project-specific baseline procedures.
</Info>

### How Revision Queries Work

When you open a document with a revision parameter, the query engine executes all queries against the historical data snapshot rather than the current state. The revision can come from:

* The `revision` URL query parameter (explicit user request)
* A context baseline set by the Polarion project

All entity queries, navigation property expansions, and constraint evaluations operate on the historical snapshot. Enum options and picker values also reflect the state at that revision.

<Warning>
  The revision parameter must be a non-negative integer. Invalid values may cause the document to fail to load. If you encounter issues, verify the baseline exists in your Polarion project.
</Warning>

## Step 5: Inspect Revision in Document Title

When viewing a historical revision, the document title updates to include the revision number in parentheses. For example:

* **Current:** "RTM Requirements Traceability"
* **Revision 42:** "RTM Requirements Traceability (Revision 42)"

This visual indicator confirms you are viewing historical data.

## Verify

After opening a document with a revision parameter:

1. You should now see the document title with the revision number appended
2. The sheet should display data as it existed at that point in time
3. All editing controls should be disabled (read-only mode)
4. Closing the revision should return you to the current live data with editing re-enabled

## See Also

* [Filter by Document](/powersheet/guides/queries/filter-by-document) -- scope queries to specific documents
* [Write an Entity Query](/powersheet/guides/queries/write-entity-query) -- query fundamentals
* [Optimize Queries](/powersheet/guides/queries/optimize-queries) -- performance tips for large datasets

<LastReviewed date="2026-07-02" />
