エンビジョンギャラリーストック

エンビジョンにサンプルストック分析


Home » Commerce Analytics » Here

次のスクリプトは、ストック分析ダッシュボードはエンビジョンで構成する方法を示します。

Image

@@ read "/サンプル1" all

show label "ストックバリューアナリシス" a1f1 tomato oend := max(Orders.Date)

// Default currency, and currency conversions when date >= oend - 365 currency := mode(Orders.Currency) Orders.NetAmount = forex(Orders.NetAmount, Orders.Currency, currency, Orders.Date) PurchaseOrders.NetAmount = forex(PurchaseOrders.NetAmount, \ PurchaseOrders.Currency, currency, PurchaseOrders.Date)

// FIFO inventory valuation PurchaseOrders.CS = cumsum(PurchaseOrders.Quantity, -PurchaseOrders.Date, Id) Fifo = sum(PurchaseOrders.CS <= StockOnHand + StockOnOrder ? PurchaseOrders.NetAmount : \ (StockOnHand + StockOnOrder - PurchaseOrders.CS + PurchaseOrders.Quantity > 0 ? \ ((StockOnHand + StockOnOrder) - PurchaseOrders.CS + PurchaseOrders.Quantity) \ * PurchaseOrders.NetAmount / PurchaseOrders.Quantity : 0)) where sum(PurchaseOrders.Quantity) < StockOnHand + StockOnOrder Fifo = Fifo + (StockOnHand + StockOnOrder - sum(PurchaseOrders.Quantity)) \ * first(PurchaseOrders.NetAmount / PurchaseOrders.Quantity)

Fifo2 = sum(PurchaseOrders.CS <= StockOnOrder ? PurchaseOrders.NetAmount : \ (PurchaseOrders.CS < StockOnOrder + PurchaseOrders.Quantity ? \ (StockOnOrder - PurchaseOrders.CS + PurchaseOrders.Quantity) \ * PurchaseOrders.NetAmount / PurchaseOrders.Quantity : 0)) where sum(PurchaseOrders.Quantity) < StockOnOrder Fifo2 = Fifo2 + (StockOnOrder - sum(PurchaseOrders.Quantity)) \ * first(PurchaseOrders.NetAmount / PurchaseOrders.Quantity)

// FIFO inventory age StockAge = 0 where PurchaseOrders.CS <= StockOnHand + StockOnOrder StockAge = min(oend - min(PurchaseOrders.Date), 365) // capping at 1 year

// Top row of KPIs show table "ストック手元 (FIFO){ \{currency}}" a2b2 with sum(Fifo - Fifo2) show table "オーダーのストック(FIFO){ \{currency}}" c2d2 with sum(Fifo2) show table "在庫のアイテム" e2 with count(StockOnHand + StockOnOrder > 0) when date > oend - 31 where sum(Orders.Quantity) by Id > 0 show table "在庫のないアイテム" f2 with sum(1)

// Stock by category and supplier show barchart "カテゴリー別ストック" a3c5 tomato with \ sum(Fifo) \ group by Category order by sum(Fifo) desc

show barchart "サプライヤーによる株式r{ \{currency}}" d3f5 tomato with \ sum(Fifo) \ group by Supplier order by sum(Fifo) desc

// Most heavy stocked items, most aged stock items show table "ほとんどの重い入荷商品" a6c8 with \ Id, \ Name, \ StockOnHand as "手元", \ StockOnOrder as "オーダリング", \ Fifo as "Value{ \{currency}}" \ order by Fifo desc

show table "ほとんどの熟成し入荷商品" d6f8 with \ Id, \ Name, \ StockOnHand as "手元に", \ Fifo as "Value{ \{currency}}", \ StockAge as "年齢(日)" \ order by Fifo * StockAge desc

// Most pressured stock items D = sum(Orders.Quantity) when date >= oend - 13 * 7 where StockOnHand + StockOnOrder <= 0 and D > 0 show table "最も求め在庫のないアイテムを" a9c11 tomato with \ Id, \ Name, \ D as "単位は最後の四半の販売し" \ order by D desc

V = sum(Orders.NetAmount) when date >= oend - 13 * 7 where sum(V) by Supplier > 0 show barchart "サプライヤーによりストック年齢 { days}" d9f11 tomato with \ sum(V * StockAge) / max(1, sum(V)) \ group by Supplier order by sum(Fifo) desc