Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi , I want a new measure calculated inventory in addition to the inventory like below.
I want to take January as starting inventory and then calculate subsequest months inventory. So suppose for a particular SAPID, COUNTRY, CFN combination JAN Inventory was 100, then the FEB calculated inventory should be (JAN INVENTORY for that SAP COUNTRY CFN combination - FEB SALESOUT for that SAP COUNTRY CFN combination + FEB SALES IN for that SAP COUNTRY CFN combination)
https://drive.google.com/file/d/1Z_Y8ETTn0_iqON44f5_CstXQPOi4vjqI/view?usp=sharing
Hi @guptav13 ,
if you transform your input data a bit before loading into the data model and include a transformation that reverts the sign of the "Sale Out"-figures, you could use a DAX running total measure on it.
If you need help with the transformation, please include usable sample data (
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
@guptav13 Well, unfortunately this seems to be a scenario where you need "previous value" or, in other words, it is a recursive problem and DAX does not like that kind of thing. Previous Value (“Recursion”) in DAX – Greg Deckler
Power Query supports recursion but it's a pain and is ugly. @ImkeF @edhans
(1) Fun with Graphing in Power BI - Part 5-by-5 | LinkedIn
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
80 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |