Forum Discussion
How to count balance for replenish ?
Hi Team ,
Can anyone share with me the dax function to get the outcome at "want this outcome" column?
I have created many to many relationship , matrix table .
- Anonymous3 years ago
Hi fyong
You can refer to the following measure
Balance_ = [PO QTY] - SUMX ( FILTER ( ALLSELECTED ( 'Demand Table' ), [Item ] IN VALUES ( 'Demand Table'[Item ] ) && [Ordered_Date] <= SELECTEDVALUE ( 'Demand Table'[Ordered_Date] ) ), [Demand QTY] )Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
9 Replies
- TomMartens
Super User
Hey fyong ,
I'm. not able to create any DAX without knowing what to do, only staring at the outcome column will create a solution that most likely is based wrong assumptions. You mentioned that you created many-to-many relationships between tables, is my understanding correct? Without knowing the exact relationships it's also not possible to create a DAX measure.
Consider creating a pbix that contains sample data, but still reflects your data model (tables, relationships, calculated columns, and measures). Upload the pbix to onedrive, google drive, or dropbox. If you are using Excel to create the sample data instead of the manual input method, then share the xlsx sheet as well. Do not forget to explain the expected result based on the data you provided.
Regards,
Tom
- fyongFrequent Visitor
Hi Tom,
I have attached some data, could you share me how to achieve the expected result?
Thank you.
https://drive.google.com/file/d/1_pQZGjXskay1y_Q25vW1Mwh-LR5t7qGP/view?usp=drive_link https://docs.google.com/spreadsheets/d/1dgOcQzypubqaDwlbMJS_drNAnvtwk35p/edit?usp=drive_link&ouid=101242351715862090420&rtpof=true&sd=true
- TomMartens
Super User
- fyongFrequent Visitor
Hi Tom ,
Please check.
Looking forward for your solution.
https://drive.google.com/file/d/1_pQZGjXskay1y_Q25vW1Mwh-LR5t7qGP/view?usp=drive_link https://docs.google.com/spreadsheets/d/1dgOcQzypubqaDwlbMJS_drNAnvtwk35p/edit?usp=drive_link&ouid=101242351715862090420&rtpof=true&sd=true