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

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

計算済みフィールドの値は、プログラムのルール設定に使用でき、幅広い高度なプログラムロジックを実現できます。ユーザー作成の [計算フィールド](/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) **\[未チェックのボックス] 保存時に値を再計算**.
   * フィールドが `合計` または `件数` の計算を使用している場合は、 [再計算](/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` イベントの収益合計に更新した場合、参加者のプロフィールにある既存の値は変更されません。次回その参加者のpurchaseイベントを受信したときに、収益額が既存の値に加算されます。                         |
| フィールドには既存のトラッキングウィンドウがありますが、そのウィンドウは **変更されていません**. |                                                                                                                                                  |                                                                                                                                                                            |
| トラッキングウィンドウが **追加されている** 既存の計算フィールドに                | <p>• 以前のフィールド値は、新しいイベントが入ってくるまでのみ保持されます。次に一致するイベントが入ってきたときに消去されます。</p><p>• 新しい設定が今後の処理に使用されます。</p><p>• 新しい設定で過去データも反映したい場合は、再計算をリクエストしてください。</p> | <p>このフィールドは、参加者が行った購入回数をカウントしています。1か月のトラッキングウィンドウを追加すると、次にその参加者のpurchaseイベントが入ってきたときに、参加者のプロフィール上の既存の値は消去されます。</p><p>5回購入した参加者の値は、 <code>5</code> 編集前は <code>1</code>.</p> |
| でした。次にこの参加者が購入すると、古い値は消去され、フィールド値は **編集されている**.     | <p>• 計算フィールドで既存のウィンドウを編集する場合は、必ず再計算してください。</p><p>• 再計算なしで編集すると、参加者のフィールド値に悪影響を及ぼす可能性があります。</p>                                                   | トラッキングウィンドウを固定ウィンドウからスライディングウィンドウに変更します。                                                                                                                                   |
| フィールドには既存のスライディングウィンドウがあり、 **最大計算値が変更されます**.        | <p>• 次に一致するイベントが入ってきたときに、新しい設定が参加者の過去データに適用されます。</p><p>• 新しいイベントを待たずにフィールド値を更新したい場合は、再計算をリクエストしてください。</p>                                        | このウィンドウ付きフィールドは現在、参加者の購入回数をカウントしており、最大値は10です。最大値が5に変更され、その参加者に新しいpurchaseイベントが入ってくると、ウィンドウ内のデータには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.
