Forum Discussion
Haiqal
1 year agoNew Member
DAX Calculated Measure
Hi All, I would like to calculate the sum of my table. My table constructured using Measure. May I know any possible way to get it done? Thanks you! I need to calculate the sum of qty assi...
as_Ash
8 months agoNew Member
Can someone write me a DAX query which could add 2 columns in Power BI table
Allocation based on ( Item code & First requested date.)
For Item B
Stock Limit: 100
Previously Used: 71 (from previous rows)
Remaining Stock: 29
Current Request: 30
- it only allocates 29 and for rest it would allocate 0
for balance Stock , it would follow sequestial (Good Stock - Allocation) if Allocation exceed Good stock then it would be 0
also there might be request date be same so it could allocate what is remaining to any
| Item_Code | Requested_Dt | Approved_Qty | Stock.Good Stock | Restricted Allocation | Balance Stock |
| A | 10/12/2024 | 19 | 40 | 19 | 21 |
| A | 9/12/2025 | 30 | 40 | 21 | 0 |
| B | 9/15/2023 | 20 | 100 | 20 | 80 |
| B | 9/12/2025 | 51 | 100 | 51 | 29 |
| B | 12/1/2025 | 30 | 100 | 29 | 0 |
| B | 12/3/2025 | 30 | 100 | 0 | 0 |
| C | 9/12/2025 | 30 | 100 | 30 | 70 |
| C | 9/12/2025 | 30 | 100 | 30 | 40 |
- v-hjannapu8 months agoCommunity Support
Hi as_Ash,
I have reproduced your requirement and implemented the solution. I have attached the PBIX file for your review so you can see the updates. Let me know if you need any changes or further improvements.
Regards,
Community Support Team.