Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[Power BI] 静的ABC分類を構築する。

[Power BI] 静的ABC分類を構築する。

Akihiro Suto

March 26, 2022
Tweet

More Decks by Akihiro Suto

Other Decks in Technology

Transcript

  1. 1

  2. 列追加 累計売上 累計売上 = VAR CurrentProductSales = 'Sales'[総売上] VAR BetterProduct

    = FILTER ( 'Sales', 'Sales'[総売上] >= CurrentProductSales ) VAR Result = SUMX ( BetterProduct, 'Sales'[総売上] ) RETURN Result 8
  3. 累計売上% 累計売上% = DIVIDE ( 'Sales'[累計売上], SUM ( Sales[総売上] )

    ) ABC分類 ABC分類 = SWITCH ( TRUE, 'Sales'[累計売上%] <= 0.7, "A", 'Sales'[累計売上%] <= 0.9, "B", "C" ) 9
  4. 11

  5. 12

  6. 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