Forum Discussion

nnouchi's avatar
nnouchi
Icon for Helper I rankHelper I
7 years ago
Solved

Measure calculating fixed average price per month

Greetings all, Is there a way to calculate a fixed average price by month? I’m required to factor in a set measure cost for avg unit prices per month. Right now I can obtain a fixed price for all o...
  • v-frfei-msft's avatar
    v-frfei-msft
    7 years ago

    Hi nnouchi ,

     

    To use VALUES function could get the excepted result here.

     

    Avg Sale Price Per Unit m = 
    CALCULATE (
        DIVIDE ( SUM ( 'Warranty_Costs'[Net_Sales] ), [Total Warranty Cores], 1 ),
        ALLSELECTED ( Warranty_Costs ),
        VALUES ( 'Warranty_Costs'[Date].[Year] ),
        VALUES ( 'Warranty_Costs'[Date].[Month] )
    )