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
130
[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
Power Automateドリブンのチームマネジメント
hanaseleb
0
180
Power BI Report Ops
hanaseleb
0
240
Power BI ”を” 可視化しよう!
hanaseleb
0
190
Power BI Premiumでデータ準備!
hanaseleb
1
230
データ損失防止ポリシーを構成してみる。
hanaseleb
1
150
PyCaretでKaggleの回帰問題に取り組む
hanaseleb
0
81
Other Decks in Technology
See All in Technology
Camp Digital 2022: tailored advice
kyliehavelock
0
140
データエンジニアと作るデータ文化
yuki_saito
4
1.5k
The application of formal methods in Kafka reliability engineering
line_developers
PRO
0
150
JFrog 最新情報 - JFrog DevOps プラットフォームの今までとこれから / jfrog-update-for-devopskaigi-2022
tsuyo
0
150
Citizen 개발기
outsider
0
150
SI企業が「アジャイル推し」になったら 幸せになれますか?/Can SI company be happy if it becomes “Agile stan” ?
chinmo
1
1.1k
要約 "Add Live Text interaction to your app"
ushisantoasobu
0
140
Istio入門
nutslove
15
4.9k
FoodTechにおける商流・金流・物流の進化/Evolution of Commercial, Financial, and Logistics in FoodTech
dskst
0
400
ROS再入門-はじめてのSLAM-
miura55
0
390
JUnit5.7, 5.8の新機能紹介 #jjug_ccc #jjug_ccc_b / junit 5.7, 5.8 new features
kyonmm
PRO
2
410
Scrum Fest Osaka 2022 フルリモート下でのチームビルディング
moritamasami
2
1.1k
Featured
See All Featured
How New CSS Is Changing Everything About Graphic Design on the Web
jensimmons
213
11k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
351
21k
Fantastic passwords and where to find them - at NoRuKo
philnash
27
1.5k
Typedesign – Prime Four
hannesfritz
33
1.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
10
3.4k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
11
4.7k
Documentation Writing (for coders)
carmenhchung
48
2.5k
Designing for humans not robots
tammielis
241
23k
Building Your Own Lightsaber
phodgson
94
4.6k
Art Directing for the Web. Five minutes with CSS Template Areas
malarkey
196
9.4k
Fontdeck: Realign not Redesign
paulrobertlloyd
73
4.1k
Raft: Consensus for Rubyists
vanstee
126
5.4k
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