Forum Discussion

CraigMFuso's avatar
CraigMFuso
Frequent Visitor
6 years ago
Solved

Required Stock carry calculation

Hi everyone. Hopefully some one can help.    I am creating a report to show resellers if they are carrying the required level of stock needed.    I need to calculate a minimum stock carry based ...
  • v-lid-msft's avatar
    v-lid-msft
    6 years ago

    Hi CraigMFuso ,

     

    Sorry for our mistake in the formula, we can try to use the following measure after build some relationship between tables:

     

    Measure = 
    var lastUpdate = MAX('Dealer SOH'[Last Updated])
    return
    ROUNDUP (
        CALCULATE (
            SUM ( 'Customer Purchase History'[QTY] ),
            FILTER('Customer Purchase History',
            'Customer Purchase History'[Trans_Datetime]
                >= lastUpdate - 365
                && 'Customer Purchase History'[Trans_Datetime] < lastUpdate)
        ) / 52 * 4,
        0
    )

     

     


    If it doesn't meet your requirement, Could you please show the exact expected result based on the Tables that you have shared?


    Best regards,