1
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?

Power BIでのデータの丸め方

1
Last updated at Posted at 2026-09-29

データの丸め方

計算(割り算)項目などで、小数点以下が非常に多い数値を表示する時の丸め方です。

image.png

手順

表示形式の設定

レポートに割り算項目を追加します。
今回は新しいメジャーから、Profit / Sales となる利益率の項目を追加しています。

利益率 = SUM(financials[Profit]) / SUM(financials[ Sales])

image.png

image.png

ただし、表示形式を設定してるだけなので、CSVにエクスポートしたときは少数桁数が長いままのデータになっています。

image.png

CSVでエクスポートした時にも丸める設定

Power BIでデータをCSV出力した際に丸めをするには2通りの方法があります。

一つ目は、列の構造体を定義する際にRound関数を使用して指定した桁数での丸めを発生させる必要があります。

利益率(少数2桁) = round( SUM(financials[Profit]) / SUM(financials[ Sales]) , 2)

image.png

image.png

これで、CSVにエクスポートしてもデータが少数2桁で表示されるようになります。

image.png

ただし、注意点があり、データ自体の丸目が発生しているため、元の利益率の項目と比べて多少の誤差が発生していることが確認できます。
どうしても誤差が発生してしまうことは認識しておきましょう。

二つ目は、書式設定で「パーセンテージ」にして、少数桁数を「2」にと設定してしまうことです。
基本的な表示形式の変更は、Excelと同じ感覚で、列ツールタブの書式設定から設定できます。
割合などのパーセンテージ項目の場合は、%表示にしつつ書式設定してしまうのも一つの手です。

image.png

image.png

ただし、CSV出力した際も%表示のままになっている点は注意が必要です。

image.png

1
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
1
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?