> 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
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=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
