> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pba/9.3-analytics/pentaho-analyzer-cp/advanced-topics/use-calculated-measures-in-analyzer-reports/tips-for-using-calculated-measures.md). Agents can also search and read this documentation through its [MCP server](https://docs.pentaho.com/~gitbook/mcp).

# Tips for using calculated measures

Keep the following guidelines in mind when working with calculated measures in Pentaho Analyzer.

* When you add a calculated measure to the data source, it is available for anyone using that data source in Analyzer. This calculated measure appears and functions like any other base measure. If you do not add your calculated measure to a data source, it will only appear in the one report where is was added.
* If you create a calculated measure just for your report, but later decide that you want other users to have access to it, then you can add the calculated measure to the data source using one of the following methods:

  | From the . . .                                                                                                                                                                                           | Do this:                                                                                     |
  | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
  | **Layout** panel                                                                                                                                                                                         | Click the Down Arrow next to the calculated measure, and then select **Add to Data Source**. |
  | **Report** panel                                                                                                                                                                                         | Right-click the calculated measure, and then select **Add to Data Source**.                  |
  | [In the Properties dialog box](https://docs.pentaho.com/pba/9.3-analytics/pentaho-analyzer-cp/advanced-topics/use-calculated-measures-in-analyzer-reports/editing-a-calculated-measure-in-the-report.md) | Select the **Apply to data source** check box.                                               |
* If you create a calculated measure and add it to the data source, but have not yet saved the report, you can use the **Undo** button to undo those actions, which will remove the calculated measure. Conversely, you can use the **Redo** button to reapply those actions.

  **Note:** When you click **Undo**, actions are removed in the reverse order in which they were applied, so any actions performed after adding the calculated measure will be undone first.
* If you add a calculated measure to the data source, you can view and edit its properties from the **Available Fields** list. See [Updating Calculated Measure Properties](https://docs.pentaho.com/pba/9.3-analytics/pentaho-analyzer-cp/working-with-analyzer-measures.md) to learn how.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pentaho.com/pba/9.3-analytics/pentaho-analyzer-cp/advanced-topics/use-calculated-measures-in-analyzer-reports/tips-for-using-calculated-measures.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
