Forum Discussion

fabiAr89's avatar
fabiAr89
New Member
1 year ago
Solved

Calculate Sum ordered by a specific date

Hello   I have a table where I have the orders that have been made with two specific collumn dates: order placement and order delivery date. My sales people are always asking me "How much of X pro...
  • Anonymous's avatar
    Anonymous
    1 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.