0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【PowerAutomate】切り上げ処理をする

Last updated at Posted at 2025-09-15

今回はPowerAutomateで切り上げ処理をする方法についてご紹介したいと思います。

方法

使用する関数は、

split関数
string関数
add関数

の3つです。

流れ的には、切り上げ処理をしたい値に0.9を足した値を[.]で分割し、整数部のみ取得するという流れで処理を行っています。

テンプレートに当てはめるだけで基本的にはOKです。

split(string(add(切り上げたい値,0.9)),'.')[0]

string関数を使う理由は、split関数の引数がstring型でないといけないからです。

また、そのため上記の式では最終出力がstring型となるので、必要に応じてキャストしてください。

正確な値が必要な場合は追加でdecimal関数を使用すると良いです。

使用例

値=1.1の場合

split(string(add(variables('number'),0.9)),'.')[0]

image.png

値=0.05の場合

split(string(add(variables('number'),0.9)),'.')[0]

image.png

切り上げ処理が出来ています。◎

おわりに

最後まで読んでいただきありがとうございました!

参考になれば幸いです。

四捨五入処理についてはよろしければこちらをご参照ください↓↓↓

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?