> For the complete documentation index, see [llms.txt](https://help.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.impact.com/brand/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/edit-a-calculated-field.md).

# 計算フィールドを編集する

算出フィールドの値はプログラムルールの設定に使用でき、幅広い高度なプログラムロジックを実現できます。ユーザーが作成した [算出フィールド](https://help.impact.com/brand/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/calculated-fields-explained.md) はいつでも編集できます。

#### 算出フィールドを編集する

1. 左側のナビゲーションメニューで、次を選択します。 ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-230534471fef5f40808e921e41ee44e4a06ded03%2Fe6cb9548999afdc1ed3ce4942e4cb5b45b5cecbd323267aac2a7cd1915fccc09.svg?alt=media) **\[Engage] → データソース → フィールド**.
2. 編集するフィールドにカーソルを合わせ、次を選択します。 **編集**.
   * ユーザーが作成した算出フィールドを選択する必要があります。デフォルトの算出フィールドは編集できません。
3. 必要に応じてフィールドを編集します。
   * フィールドの計算に使用するイベントや、フィルター、トラッキング期間を変更できます。
   * 算出フィールドのキーと計算タイプは変更できません。
4. 必要に応じて、 *確認* セクションで次を選択します。 ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-b5e1740618ed6571d97b8fed7c25a7678f85d375%2F299632fb6f4f91fbf9847471754cc6180e4284a65b4960af4c4ea472a159f552.svg?alt=media) **\[未選択のチェックボックス] 保存時に値を再計算**.
   * フィールドで `sum` または `count` の計算を使用している場合は、 [再計算](https://help.impact.com/brand/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields.md)をリクエストすることをおすすめします。他の計算タイプでは再計算できません。変更する前に [再計算に関する注意事項](#edit-a-calculated-field) を参照してください。
5. を選択します。 **保存**.

#### 再計算に関する注意事項

| 条件                                            | 結果                                                                                                                                       | 例                                                                                                                                                                                                    |
| --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| フィールドにトラッキング期間がない、またはトラッキング期間が **削除された**.     | <p>• 以前のフィールド値が保持され、新しい計算の開始値として使用されます。</p><p>• 以降は新しい計算が使用されます。</p>                                                                     | フィールドが現在、 `userPurchase` イベントの収益を合計しているとします。代わりに `purchase` イベントの収益を合計するように更新しても、参加者のプロフィールの既存の値は変わりません。次にその参加者の購入イベントを受信したときに、収益額が既存の値に加算されます。                                                      |
| フィールドに既存のトラッキング期間があり、その期間は **変更されない**.        |                                                                                                                                          |                                                                                                                                                                                                      |
| 既存の算出フィールドにトラッキング期間を **追加する** 場合              | <p>• 以前のフィールド値は、新しいイベントが届くまで保持されます。次に一致するイベントが届くと、その値は消去されます。</p><p>• 以降は新しい設定が使用されます。</p><p>• 新しい設定で過去のデータを考慮する場合は、再計算をリクエストしてください。</p> | <p>フィールドが参加者の購入回数をカウントしているとします。1か月のトラッキング期間を追加すると、次に購入イベントが届いたときに、参加者のプロフィールの既存の値が消去されます。</p><p>5回購入した参加者の場合、変更前の値は <code>5</code> です。次にこの参加者が購入すると、古い値が消去され、フィールド値は次のように設定されます。 <code>1</code>.</p> |
| フィールドに既存のトラッキング期間があり、その期間を **編集する**.          | <p>• 計算フィールドの既存のウィンドウを編集する場合は、必ず再計算してください。</p><p>• 再計算せずに編集すると、参加者のフィールド値に悪影響が生じる可能性があります。</p>                                           | トラッキングウィンドウを固定ウィンドウからスライディングウィンドウに変更します。                                                                                                                                                             |
| フィールドに既存のスライディングウィンドウがあり、 **計算の最大値が変更された場合**. | <p>• 次に条件に一致するイベントが発生すると、新しい設定が参加者の過去のデータにも適用されます。</p><p>• 新しいイベントを待たずにフィールド値を更新するには、再計算をリクエストしてください。</p>                                | ウィンドウフィールドでは現在、参加者が購入した回数を最大値10としてカウントしています。最大値が5に変更された後、その参加者の新しい購入イベントが発生すると、ウィンドウ内のデータに最大値5が遡及的に適用されます。                                                                                           |

{% hint style="warning" %}
**警告：** ウィンドウ型の計算フィールドの値は、API経由で手動で上書きできません。既存の値を上書きするデータを送信すると、エラーメッセージが返されます。
{% endhint %}


---

# 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://help.impact.com/brand/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/edit-a-calculated-field.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.
