Skip to Content
エクセルによる最新のデータ分析
book

エクセルによる最新のデータ分析

by George Mount
March 2025
Beginner to intermediate
244 pages
3h 31m
Japanese
O'Reilly Media, Inc.
Audio summary available
Content preview from エクセルによる最新のデータ分析

第8章 PowerPivotでメジャーとKPIを作成する Power PivotでメジャーとKPIを作成する

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

第 7 章では、リレーションシップ、階層、計算列など、Power Pivot とデータ・モデルの基本を紹介した。この章では、データ・モデルを使用して、エンド・ユーザのデータ解釈を支援するための DAX メジャーと KPI を作成する。

デモについては、本書の付属リポジトリのch_08フォルダにあるch_08.xlsxを参照されたい。この章では、第7章と同じ小売売上データセットを使用し、提供された演習ファイルでデータモデルを定義する。

DAXメジャーの作成

第7章では、 、orders テーブルにprofit margin 列を追加しようとしたが、満足のいく結果は得られなかった。異なるカテゴリや期間にわたって結果を集計および再計算するには、DAX メジャーが必要である。Power Pivot では、メジャーは暗黙的および明示的の 2 つの方法で作成できる。これらのメソッドを実際に体験するには、データ・モデルからピボット・テーブルを挿入する。

暗黙のメジャーの作成

地域別の合計注文数量を発見するような集計データには、通常、図 8-1 に示すように、フィールドをピボットテーブルに直接ドラッグする。

地域別の平均販売個数を決定するために集計を調整するには、ピボットテーブルの「注文数量の合計」のドロップダウンに移動する。そして、"値フィールドの設定 "に進み、"値フィールドの集計 "セクションで、"合計 "から "平均 "に切り替える。

Drag-and-drop-aggregation
図8-1. 古典的なドラッグ・アンド・ドロップによるピボット・テーブル集計

データモデルがこれらのピボットテーブル計算をどのように管理しているかを確認するには、リボンのPower Pivotタブに移動し、Manageを選択する。ホーム] タブの [ビュー] グループから [ダイアグラム・ビュー] を選択する。次に、[詳細設定] タブで [暗黙的メジャーの表示] を有効にする。これにより、図 8-2 に示すように、orders テーブルの下部に 2 つのメジャーが追加される。

PivotTable を介して先に作成されたメジャーは、暗黙メジャーと呼ばれる。Power Pivot は、これらのメジャーを自動的に生成して保存する。これらのメジャーは、複雑な計算を開発する必要なく、Swift データ探索および分析の利便性を提供する。

Diagram view implicit measures
図8-2. ダイアグラム・ビューに表示される暗黙の措置

しかし、暗黙的なメジャーは、データ・モデル全体のカスタマイズと再利用性に課題をもたらす。販売個数あたりの平均売上高のような新しい派生メジャーを確立するには、既存のフィールドを単に集計するだけでは十分ではない。2 つのフィールド (売上と注文数量) を組み合わせた独立した明示的メジャーの作成が不可欠になる。さらに、暗黙メジャーの隠された性質は、その管理と構成を複雑にする。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

ウェブ・アクセシビリティ・クックブック

ウェブ・アクセシビリティ・クックブック

Manuel Matuzovic
DevOpsのためのPython

DevOpsのためのPython

Noah Gift, Kennedy Behrman, Alfredo Deza, Grig Gheorghiu

Publisher Resources

ISBN: 9798341626461