Forum Discussion
Calculate Sum ordered by a specific date
- Anonymous1 year ago
Hi, fabiAr89
Based on your information, I create sample table:
Then create new measure, calculate the total number of products for all orders with delivery dates up to and including the end of the month, try the following DAX:
TotalKgToBeDeliveredByEOM = CALCULATE( SUM('Table'[Quantity]), FILTER( 'Table', 'Table'[DeliveryDate] <= EOMONTH(TODAY(), 0) ) )Here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi fabiAr89
Consider using an inactive relationship, which can be activated with the USERELATIONSHIP function. This is beneficial when there's already a relationship between your calendar table and the order date in the orders table, but you need another one for the shipping or delivery date. If there's an existing relationship between these tables, any additional relationships will become inactive since only one can be active at a time. However, this might not be exactly what you need.
Please provide a workable sample data (not an image), your expected result from the same sample data and the reasoning behind. https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523