Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
formula = previous month closing stock +receipts+production-demnad
Brand | Product Code | Date | Sum of Closing Stock | Demand | Production | Receipts |
Brand A | 694193 | 01-03-2022 | 35255 | |||
Brand A | 716504 | 01-03-2022 | 26703 | |||
Brand A | 722757 | 01-03-2022 | 19308 | |||
Brand B | 728221 | 01-03-2022 | 29024 | |||
Brand B | 736682 | 01-03-2022 | 30673 | |||
Brand C | 748798 | 01-03-2022 | 39212 | |||
Brand C | 749064 | 01-03-2022 | 3240 | |||
Brand A | 694193 | 01-04-2022 | 30535 | 0 | 21780 | |
Brand A | 716504 | 01-04-2022 | 22203.25 | 15173 | 0 | |
Brand A | 722757 | 01-04-2022 | 16017.29 | 20409 | 0 | |
Brand B | 728221 | 01-04-2022 | 24531 | 17635 | 0 | |
Brand B | 736682 | 01-04-2022 | 26039.67 | 20278 | 0 | |
Brand C | 748798 | 01-04-2022 | 39211.58 | 37622 | 0 | |
Brand C | 749064 | 01-04-2022 | 1078.834 | 0 | 1045.334 | |
Brand A | 694193 | 01-05-2022 | 24891 | 0 | 20100 | |
Brand A | 716504 | 01-05-2022 | 18304 | 21621.38 | 0 | |
Brand A | 722757 | 01-05-2022 | 16072.54 | 14351.33 | 0 | |
Brand B | 728221 | 01-05-2022 | 22127.67 | 27013.33 | 0 | |
Brand B | 736682 | 01-05-2022 | 24910.67 | 24362.17 | 0 | |
Brand C | 748798 | 01-05-2022 | 37621.42 | 42036.25 | 0 | |
Brand C | 749064 | 01-05-2022 | 1082.834 | 0 | 1156.167 | |
Brand A | 694193 | 01-06-2022 | 23271 | 0 | 12580.93 | |
Brand A | 716504 | 01-06-2022 | 19663.46 | 12442.5 | 0 | |
Brand A | 722757 | 01-06-2022 | 17261.96 | 14012.17 | 0 | |
Brand B | 728221 | 01-06-2022 | 27013.83 | 10103.33 | 0 | |
Brand B | 736682 | 01-06-2022 | 24362.67 | 20547.83 | 0 | |
Brand C | 748798 | 01-06-2022 | 42037.08 | 21671.13 | 0 | |
Brand C | 749064 | 01-06-2022 | 1074.667 | 0 | 993.501 | |
Brand A | 694193 | 01-07-2022 | 12225 | 0 | 23230.1 | |
Brand A | 716504 | 01-07-2022 | 13363.79 | 10917.58 | 0 | |
Brand A | 722757 | 01-07-2022 | 17061.46 | 8524.833 | 0 | |
Brand B | 728221 | 01-07-2022 | 10103.33 | 20276 | 0 | |
Brand B | 736682 | 01-07-2022 | 20547.83 | 13400.17 | 0 | |
Brand C | 748798 | 01-07-2022 | 21671.13 | 22687.37 | 0 | |
Brand C | 749064 | 01-07-2022 | 0 | 0 | 334.833 |
Solved! Go to Solution.
Hi @tkavitha911
You can try below calculated column expression.
Closing Stock =
CALCULATE(
SUMX('Table','Table'[Sum of Closing Stock]+'Table'[Production]+'Table'[Receipts]-'Table'[Demand]),
ALLEXCEPT('Table','Table'[Brand],'Table'[Product Code]),
'Table'[Date]<=EARLIER('Table'[Date])
)
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Thank you for your assistance, your solution resolved my issue, and I have marked your post as the solution and added Kudos.
Hi @tkavitha911
You can try below calculated column expression.
Closing Stock =
CALCULATE(
SUMX('Table','Table'[Sum of Closing Stock]+'Table'[Production]+'Table'[Receipts]-'Table'[Demand]),
ALLEXCEPT('Table','Table'[Brand],'Table'[Product Code]),
'Table'[Date]<=EARLIER('Table'[Date])
)
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
I need assistance with calculating the closing stock for each month using DAX, starting from the March closing stock. Could someone please help me with this.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
13 | |
12 | |
10 | |
7 | |
7 |
User | Count |
---|---|
18 | |
14 | |
11 | |
11 | |
9 |