メインコンテンツへスキップ

Excelのピボットテーブルで加重平均を計算するにはどうすればよいですか?

一般に、ExcelのSUMPRODUCT関数とSUM関数を組み合わせて加重平均を計算するのは簡単です。 ただし、計算フィールドはピボットテーブルの関数をサポートしていないようです。 したがって、ピボットテーブルの加重平均をどのように計算できますか? この記事では、解決策を紹介します。

Excelのピボットテーブルで加重平均を計算する


Excelのピボットテーブルで加重平均を計算する

以下のスクリーンショットに示すように、ピボットテーブルを作成したとします。 そして、ピボットテーブルを例として取り上げ、ピボットテーブル内の各果物の加重平均価格を計算します。

1。 まず、のヘルパー列を追加します 単位 ソースデータで。
ソースデータに空白の列を挿入し、次のように入力します 単位 列名として、次のタイプ = D2 * E2 このヘルパー列の最初のセルで、最後にオートフィルハンドルをドラッグして列全体を埋めます。 スクリーンショットを参照してください:

2。 ピボットテーブルで任意のセルを選択して、 ピボットテーブルツール、[OK]をクリックします 解析 (または オプション)> Refresh。 スクリーンショットを参照してください:

3。 クリックしてください 解析 > フィールド、アイテム、およびセット > 計算フィールド。 スクリーンショットを参照してください:

4。 [計算フィールドの挿入]ダイアログボックスで、次のように入力してください 体重平均 セクションに 名前 ボックスに、= Amount / Weight(フィールド名に基づいて数式を変更してください)と入力します。 ボックスをクリックし、 OK ボタン。 スクリーンショットを参照してください:

ここでピボットテーブルに戻ると、小計行の各果物の加重平均価格が表示されます。 スクリーンショットを参照してください:


関連記事:

最高のオフィス生産性向上ツール

🤖 Kutools AI アシスタント: 以下に基づいてデータ分析に革命をもたらします。 インテリジェントな実行   |  コードを生成  |  カスタム数式の作成  |  データを分析してグラフを生成する  |  Kutools関数を呼び出す...
人気の機能: 重複を検索、強調表示、または識別する   |  空白行を削除する   |  データを失わずに列またはセルを結合する   |   数式なしのラウンド ...
スーパールックアップ: 複数の基準の VLookup    複数の値の VLookup  |   複数のシートにわたる VLookup   |   ファジールックアップ ....
詳細ドロップダウン リスト: ドロップダウンリストを素早く作成する   |  依存関係のドロップダウン リスト   |  複数選択のドロップダウンリスト ....
列マネージャー: 特定の数の列を追加する  |  列の移動  |  Toggle 非表示列の表示ステータス  |  範囲と列の比較 ...
注目の機能: グリッドフォーカス   |  デザインビュー   |   ビッグフォーミュラバー    ワークブックとシートマネージャー   |  リソースライブラリ (自動テキスト)   |  日付ピッカー   |  ワークシートを組み合わせる   |  セルの暗号化/復号化    リストごとにメールを送信する   |  スーパーフィルター   |   特殊フィルター (太字/斜体/取り消し線をフィルター...) ...
上位 15 のツールセット12 テキスト ツール (テキストを追加, 文字を削除する、...)   |   50+ チャート 種類 (ガントチャート、...)   |   40+ 実用的 (誕生日に基づいて年齢を計算する、...)   |   19 挿入 ツール (QRコードを挿入, パスから画像を挿入、...)   |   12 変換 ツール (数字から言葉へ, 通貨の換算、...)   |   7 マージ&スプリット ツール (高度な結合行, 分割セル、...)   |   ... もっと

Kutools for Excel で Excel スキルを強化し、これまでにない効率を体験してください。 Kutools for Excelは、生産性を向上させ、時間を節約するための300以上の高度な機能を提供します。  最も必要な機能を入手するにはここをクリックしてください...

説明


Officeタブは、タブ付きのインターフェイスをOfficeにもたらし、作​​業をはるかに簡単にします

  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、Visioおよびプロジェクト。
  • 新しいウィンドウではなく、同じウィンドウの新しいタブで複数のドキュメントを開いて作成します。
  • 生産性を 50% 向上させ、毎日何百回もマウス クリックを減らすことができます!
Comments (11)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Wouldn't you have the same result if you dragged a second time the field "Price" and change the value field setting summarize by Average?
This comment was minimized by the moderator on the site
That will not give you the weighted average
This comment was minimized by the moderator on the site
Sabrás que me estaba reventando el cerebro en tratar de hacerlo en power pivot, pero con esto te pasaste de bravo, gracias doc.
This comment was minimized by the moderator on the site
THANK YOU SOOO MUCH!!!!! YOU ARE A ANGEL FROM HEAVEN <3
This comment was minimized by the moderator on the site
THANK YOU! Love it. It works for me at multiple level. Genius way to solve an issue in a simple way.
This comment was minimized by the moderator on the site
This just wrong I think. Why is the average and wrigher average the same number? Multiplying and divining just cancel out and you are left with the same result. Grrrr..
This comment was minimized by the moderator on the site
You are comparing the weighted average of one data point to the average of one data point. They will always be the same. If you look at the totals row, the average it is giving you is the weighted average (5.31...) not the average (5.2)
This comment was minimized by the moderator on the site
Awesome! Never thought of a helper column lol
This comment was minimized by the moderator on the site
i like it, but what if you need to add extra conditions?
This comment was minimized by the moderator on the site
Hi Meeeee,
What kinds of conditions will you add? In most cases, you can update your source table, refresh the PivotTable, and then add calculated fields.
This comment was minimized by the moderator on the site
Te la rifaste campeón, denle una cerveza bien fría a este hombre.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations