> For the complete documentation index, see [llms.txt](https://docs.ins-pi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ins-pi.com/command/get-the-app/upgrade-v260-to-v261/path-c-retire-some-features/measures.md).

# Retire legacy measures (Cost and KPI)

Retire the legacy Cost and KPI feature after upgrading to YouDesign Command v26.1, after moving the cost and KPI history into Measures.

Retires the legacy Cost and KPI implementation. The new [Measures](https://docs.ins-pi.com/command/features/measures.md) replaces it. Follow [Upgrade from v26.0 to v26.1](https://docs.ins-pi.com/command/get-the-app/upgrade-v260-to-v261.md) first.

{% hint style="danger" %}
**Migrate immediately before committing.** Until the migration has run, Measures holds nothing for these records, and the cleanup set drops the tables that hold the cost and KPI history. Of all the features, this is the one where the wrong order costs the most.
{% endhint %}

## Steps

### 1. Back up the legacy tables

The cleanup set drops these tables with every record in them. Export them to XML before you migrate, so the records can be put back if anything goes wrong.

| Table              | Name                             |
| ------------------ | -------------------------------- |
| **Cost**           | `x_inpgh_upmx_pf_cost`           |
| **Cost Breakdown** | `x_inpgh_upmx_pf_cost_breakdown` |
| **KPI**            | `x_inpgh_upmx_pf_kpi`            |
| **KPI Breakdown**  | `x_inpgh_upmx_pf_kpi_breakdown`  |

For each one:

1. Open `https://<instance>.service-now.com/<name>_list.do`, with the name from the table above.
2. Right-click any column heading and choose **Export > XML**.
3. Save the file somewhere outside the instance.

If a list holds more records than your instance exports at once, filter it into parts, for example by **Created**, and export each part.

To put the records back, back out the cleanup set so the tables return, then on each table's list right-click a column heading, choose **Import XML** and select its file.

### 2. Migrate the data

1. In Command, click **Open menu** (☰), expand **Migration** and choose **Measures**.
2. Click **Migrate definitions** and wait for 100%. Fix anything a warning card asks for first, such as an instance currency that is not set.
3. Click **Migrate values** and wait for 100%, with nothing left *to write*, *stale to remove* or that *cannot be written*.
4. Click **Re-check** on both steps right before step 3 of this page, to catch anything added since. Running it again is safe.

The Measures migration stays available until the legacy tables are gone, so it can be run again if the update set is ever backed out.

### 3. Commit the update set

**First, check Logic Preservation.** In **Retrieved Update Sets**, look for **YCM V26.1 Legacy Logic Preservation** with the state **Committed**.

If it is already committed, for example because you retired another feature first, do not commit it again. Committing it again turns the shared Lifecycles and Measures calculation jobs back on, even ones you deleted by hand. If it is not there, or not yet committed, commit it now:

{% file src="/files/r5th8lgCHZ3rAU8Ldbom" %}

Then commit **YCM V26.1 Legacy Measures Cleanup**. Skip this set if you are using **Full Cleanup**.

{% file src="/files/W1fGpmSTkiPg7EfNJiOG" %}

Then open a record's Measures in Command and check its cost history is there before you go further. If it is missing, the migration did not run first: back out the Measures set, check the legacy tables are back, run the Measures migration, then commit the set again. If the legacy rows are gone, put them back from the backup you took in step 1.

### 4. Delete 2 scheduled jobs

The set switches these shared jobs off because the data they read is gone. In **System Definition > Scheduled Jobs**, delete:

* `YCM CAL Set Cost Calculations`
* `YCM CAL Set User Count`

If you keep Cost and KPI, both keep running.

### 5. Delete the realtime indicators on removed fields

Open `https://<instance>.service-now.com/x_inpgh_upmx_pf_indicators_list.do?sysparm_query=fieldLIKEopex%5EORfieldLIKEcapex`. The search matches on part of the field name, so review each indicator before deleting it.

### 6. Remove the Costs and KPIs form sections

1. Open each list below.\
   Review each section listed before you delete it: the search matches the section name on every form, so a section with the same name on another form that still needs it can appear too. Delete only the sections that belong to legacy Cost and KPI.
   * `https://<instance>.service-now.com/sys_ui_form_section_list.do?sysparm_query=sys_ui_section.caption%3DCosts`
   * `https://<instance>.service-now.com/sys_ui_form_section_list.do?sysparm_query=sys_ui_section.caption%3DKPIs`
2. Remove the cost related lists from the forms that still show them. Until they go, the **Cost** tab can show empty.
3. Clear the cache: open `https://<instance>.service-now.com/cache.do`.

## Check it worked

* Cost and KPI values show in Command's Measures.
* The **Costs** and **KPIs** tabs are gone from the Business Application form.
* No realtime indicator still refers to an opex or capex field.

## Good to know

* The set removes nine cost fields on Portfolio Element (`x_inpgh_upmx_portfolio_element`), such as *opex per user*. Their values on child tables are expected to go with them; check this on a test instance first.

## Related

* [Upgrade from v26.0 to v26.1](https://docs.ins-pi.com/command/get-the-app/upgrade-v260-to-v261.md)
* [Measures](https://docs.ins-pi.com/command/features/measures.md)


---

# 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.ins-pi.com/command/get-the-app/upgrade-v260-to-v261/path-c-retire-some-features/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.
