Forum Discussion

ukhan2020TO's avatar
ukhan2020TO
Frequent Visitor
6 years ago
Solved

Daily Sales Run Rate/Projection Measure

Hello,   I need to create a measure where by the formula takes my daily sales and then gives me a projection until the end of the month based on the remaining days left in the month e.g. (MTD sales...
  • v-easonf-msft's avatar
    v-easonf-msft
    6 years ago

    Hi, ukhan2020TO 

     

    Here is a sample .

    pbxi attached 

     

    Try measures as below if it works:

    Today = DATE(2020,05,24)
    _bussiness_days = CALCULATE(COUNT('Table'[Date]),FILTER('Table',WEEKDAY('Table'[Date],2)<=5))
    _fact_bussiness_days = 
    CALCULATE (
        COUNT ( 'Date'[Date] ),
        FILTER (
            'Date',
            ( WEEKDAY ( 'Date'[Date], 2 ) <= 5 )
                && 'Date'[Date] >= DATE ( YEAR ( [Today] ), MONTH ( [Today] ), 1 )
                && 'Date'[Date]
                    <= DATE ( YEAR ( [Today] ), MONTH ( [Today] ) + 1, 1 ) - 1
        )
    )
    result = SUM('Table'[Daily Days])/[_bussiness_days]*[_fact_bussiness_days]

     

    Best Regards,
    Community Support Team _ Eason