Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
We’ve defined two key measures to display sold and purchased quantities:
When adding these measures to the matrix visual, the results for January 2016 are correct. However, from February 2016 onward, negative stock values appear, which do not provide a meaningful view of the stock dynamics. To fix this, we need cumulative totals—tracking purchases and sales from the start date up to a specific date. The stock balance will then be calculated as the difference between these cumulative measures.
To define cumulative measures, we use CALCULATE with FILTER and ALL functions to accumulate the quantities dynamically by date:
Using these cumulative measures, we can now calculate the stock balance effectively.
After removing the individual sold and purchased measures from the matrix visual and adding the cumulative sold, cumulative purchased, and stock measures, the results become accurate and dynamic. The stock balance now reflects the real-time state by considering cumulative quantities.
You can further refine the visual by adding stores to the matrix, enabling stock tracking at the store level across months. Additionally, removing the month granularity will display the stock per store as of the latest date. You can also track the stock balance per product group alongside stores to gain deeper insights into inventory distribution.
Using cumulative calculations ensures that stock balances are dynamically tracked, reflecting the accurate movement of goods over time. This approach helps avoid negative or misleading stock values and provides the flexibility to analyze stock by stores, products, or groups at any point in time. The cumulative measures create a robust foundation for meaningful insights, supporting better decision-making in inventory management.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.