> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 小数部分が 2 つの値を表示しないように制限する方法

> MoEngage で Jinja 構文を使用して、ユーザー属性およびイベント属性の float、long、big integer の値をフォーマットします。意図しない小数表示の問題を防ぎます。

## 手順

ユーザー属性またはイベント属性の float、long、big integer の値を処理するには、Jinja を使用します。

> [!WARNING]
>
> *round* 関数は Jinja 2.8 バージョンではサポートされていないため、代わりに *format* 関数を使用することをお勧めします。

## 例

Jinja 構文は次のようになります。

```json Jinja wrap theme={null}
${{'%0.2f'| format(sumHST | float) }} --> User attribute
${{'%0.2f'| format(EventAttribute.totalTaxLessAllInclusiveTaxes|float)}} --> Event attribute
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.