Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
[Power BI] 静的ABC分類を構築する。
Akihiro Suto
March 26, 2022
Technology
0
190
[Power BI] 静的ABC分類を構築する。
https://powerbi.connpass.com/event/240937/
Akihiro Suto
March 26, 2022
Tweet
Share
More Decks by Akihiro Suto
See All by Akihiro Suto
プッシュデータセットを試してみよう
hanaseleb
0
110
レポートをつくる、その先の運用を考える🤔 Power BI Report Ops
hanaseleb
0
3.1k
Power BI データフローを考える
hanaseleb
1
550
DAXクエリをDAX Studioでつくって、Power Automateで発射する💪
hanaseleb
1
1.5k
BIのPowerをAutomateする
hanaseleb
0
270
Power BI のうらがわ
hanaseleb
1
290
ゼロからはじめたPower BI
hanaseleb
1
420
Power Automateドリブンのチームマネジメント
hanaseleb
0
350
Power BI Report Ops
hanaseleb
0
380
Other Decks in Technology
See All in Technology
AI Builderについて
miyakemito
0
780
LINE iOSエンジニアの日々 / LINE iOS Engineer Days
line_developers
PRO
1
130
lt53
98_justdoit
0
110
Kubernetes_EKSに入門してみる
toru_kubota
0
230
エンタープライズ領域でのブロックチェーン・インターオペラビリティの発展 / Enterprise Blockchain Interoperability
gakumura
0
120
インフラ技術基礎勉強会 開催概要
toru_kubota
0
140
Airdrop for Open Source Projects
epicsdao
0
300
Oktaの管理者権限を適切に移譲してみた
shimosyan
2
250
【Oracle Cloud ウェビナー】事例から見る規模別クラウド・データベースの選び方 (Oracle Database) (2023年1月18日)
oracle4engineer
PRO
0
100
アムロは成長しているのか AIから分析する
miyakemito
1
350
AI Services 概要 / AI Services overview
oracle4engineer
PRO
0
160
グローバルチームことはじめ / Bootstrapping a global team
tasshi
1
640
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
38
3.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
6
840
Designing the Hi-DPI Web
ddemaree
273
32k
For a Future-Friendly Web
brad_frost
166
7.7k
How to name files
jennybc
47
73k
Robots, Beer and Maslow
schacon
154
7.3k
Debugging Ruby Performance
tmm1
67
11k
Creatively Recalculating Your Daily Design Routine
revolveconf
207
11k
No one is an island. Learnings from fostering a developers community.
thoeni
12
1.5k
Building Applications with DynamoDB
mza
85
4.9k
Teambox: Starting and Learning
jrom
124
7.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
44
14k
Transcript
1
ABC分析とは https://ja.wikipedia.org/wiki/ABC分析 ABC分析(エイビーシーぶんせき)とは「重点分析」とも呼ばれ在庫 管理などで原材料、製品(商品)等の資金的重要度を分析する手法であ る。在庫の資産としての価値などの評価(重要度)別に段階的な管理手 順を適用する。この手法は品質管理におけるパレート分析に類似して いる。 2
静的ABC分類 モデリング Salesテーブル 3
Produstsテーブル 4
リレーション 5
ビジュアライズ こんな感じのテーブルになり ます。 6
新しい列を追加 新しい列を追加していきます。 7
列追加 累計売上 累計売上 = VAR CurrentProductSales = 'Sales'[総売上] VAR BetterProduct
= FILTER ( 'Sales', 'Sales'[総売上] >= CurrentProductSales ) VAR Result = SUMX ( BetterProduct, 'Sales'[総売上] ) RETURN Result 8
累計売上% 累計売上% = DIVIDE ( 'Sales'[累計売上], SUM ( Sales[総売上] )
) ABC分類 ABC分類 = SWITCH ( TRUE, 'Sales'[累計売上%] <= 0.7, "A", 'Sales'[累計売上%] <= 0.9, "B", "C" ) 9
ビジュアライズ 列を追加することで静 的ABC分類が完成しま した。ビジュアライズ をして確認します。 10
11
12
うん、よさそう 13
静的ABC分類の最適化 列を追加 → モデルのサイズ大 更新に時間がかかってしまう可能性大 ABC分類の結果がほしいだけであれば、すべての列追加をひとつのコ ードにまとめ、モデルのサイズを小さくすることも検討。 14
ADDCOLUMNS 関数を使用。 最適化ABC分類 = VAR SalesByProduct = ADDCOLUMNS ( 'Sales',
"@ProdSales", [総売上] ) VAR CurrentSales = [総売上] VAR BetterProducts = FILTER ( SalesByProduct, [@ProdSales] >= CurrentSales ) VAR CumulatedSales = SUMX ( BetterProducts, [@ProdSales] ) VAR CumulatedPct = DIVIDE ( CumulatedSales, SUM ( Sales[総売上] ) ) VAR ABCClass = SWITCH ( TRUE, CumulatedPct <= 0.7, "A", CumulatedPct <= 0.9, "B", "C" ) RETURN 15
このバージョンのコード → モデルサイズ小 ただし、プロダクト数が多いデータベースでは、 カラムの計算に過剰なメモリを必要とする場合があります。 要は適材適所ってことですね 16
おしまい 17