Supply Chain Management with Fabric: Demand Volatility Monitoring in Real-Time
In communities you find numerous discussions if ABC-XYZ analysis makes sense. In this article we assume that the reader applies ABC-XYZ in a reasonable context.
The focus is here to apply ABC-XYZ using Fabric in a real-time manner. Microsoft Fabric is meant to be an efficient tool set for exercising business
process analytics with all the benefits of in-memory databases and distributed computing. Thus, we want to check if we can quickly set up
a near to real-time monitoring of the volatility of our demand using this method.
For our reasoning we will take a path as follows:
We take real demand data and apply the usual ABC-XYZ methodology. The method is standard in every supply planning or IBP system. We want to figure out how we can quickly setup this method with near to real-time events in Microsoft Fabric |
Power Automate will pull the events and Fabric will be used to do the real-time analytics, to see how the demand classifies according to ABC-XYZ |
So, this is a little exercise about simulation on the Power Platform and Fabric as well.
Implementation
Custom Event Hub Setup in Microsoft Fabric
The event hub setup follows event hub setup.
Key implementation details:
You can setup a custom event hub in Fabric to process any streaming data source |
Once you have specified the JSON of your order line event, a KQL database table is setup to capture the events as they come in |
Order line polling with Power Automate
Key implementation details:
You have a REST API available where you can poll a number or order lines from |
The HTML process step in Power Automate gives you a list of JSON objects with order line details |
The order line objects are sent as event to the Fabric event hub |
Stream Analytics with KQL
Fabric uses KQL databases for event capturing. Naturally, KQL (Kusto Query Language) is the query language of choice to analyze
the incoming data. KQL is tailored to stream analytics and structure-wise it resembles Power Query or F# pipelines
(and these are languages that are functional languages, although F# has mutable features).
In this simple example the order line object has a SKU, a date, and a quantity.
Key implementation details:
The order event table in the code is just a placeholder for the real table |
The ABC analysis as per unit, as in the simple example here no turnover figures per order line are submitted. X is the SKUs that account for 70% of the turnover descending by number of units in the regarded period |
XYZ uses the standard deviation by SKU divided by the mean as coefficient of variance. A variance lower than 0.5 is X and so on. “L” is used for “Launch,” when first events come in and a standard deviation cannot yet be calculated |
The lookback period is one month |
The result is a table with the columns SKU, ABC and XYZ |
This can easily be used in Power BI report showing the number of SKUs per
classification as a toy visualization:
In summary, the Fabric Data Activator workload lets you quickly setup a real-time monitoring by means of the ABC-XYZ method.
This is just a simplistic starting point. You can easily imagine an alert system where SKUs change to a more volatile classification.
As mentioned in the beginning, this is no judgement of the method as such.
The goal was to check if we can implement such method swiftly in a real-time fashion in the Fabric framework.