Forum Discussion
Production planning practice
Hi yavuzonaran ,
foodd , thanks for your concern about this case. I tried to create a sample data myself based on the user's requirement and implemented the result. Please check if there is anything that can be improved. Here is the sample data:
You can try below formula to create a measure:
Need to buy = SUMX (
'Table',
IF (
'Table'[Amount] > 'Table'[Consumption],
0,
'Table'[Consumption] - 'Table'[Amount]
)
)
The final result is shown in the figure:
If you have any other questions please feel free to contact me.
Best Regards,
Zhu
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
- yavuzonaran2 years agoFrequent Visitor
Hello Anonymous Thank you for your reply. There is a relationship between first table's first column and second table's first column and icant break it because it affects rest of document. So, is there any other solution for this?
Thanks in advance ππ
- yavuzonaran2 years agoFrequent VisitorHello, Any chance to check my last reply? π
- Anonymous2 years agoNot applicable
Hi yavuzonaran ,
I apologize for my late reply. Thank you very much for your reply. Following your description, I recreated the two tables that are related:
The relationship between them is:
Here is my solution:
1.Create two measures:
Production Plan = MAX('Table'[Production Plan1]) Consumption = INT(MAX('Table'[Amount])*'Table'[Production Plan])2. You can try below formula to create the measure βneed to buyβ:
Need to Buy = SUMX('Table (2)',IF('Table (2)'[Amount]<'Table'[Consumption],'Table'[Consumption]-'Table (2)'[Amount],0))3.The final result is as follows:
Best Regards,
Zhu
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!- yavuzonaran2 years agoFrequent VisitorHi Anonymous Thank you very much for your detailed answer appreciate that π I want to ask you something, In my original workbook, I already have relationship between two tables which are Table 1 [Product Code] and Table 2 [Raw Material Code]. And I cant change this because affecting rest of workbook. If it's possible for you, i would like to show you on an online meeting shortly (max 5 min) and we can reach solution. Hope to hear from you soon π