Forum Discussion

felipesaw's avatar
felipesaw
Frequent Visitor
3 years ago
Solved

Months with same value dax

Hi, i need help to calculate a formula. Sum the months of same value in dax

 

i need this result:

 

=sum (MonthValue *MonthsApply) / total months

 

In this example, would be:

=((1000*2)+(2000*1)+(2500*2)) / 5

 

Month

Value
Jan1000
Fev1000
Mar2000
Apr2500
May2500

3 Replies

  • Hi  felipesaw 

     Try like:

    Measure = 
    DIVIDE(
        SUM(TableName[Value]),
        COUNTROWS(TableName)
    )
  • tamerj1's avatar
    tamerj1
    Icon for Community Champion rankCommunity Champion

    Hi felipesaw 

    this is the same as ( 1000 + 1000 + 2000 + 2500 + 2500 ) / 5 which equals to

    AVERAGEX ( 

    VALUES ( 'Table'[Month] ),

    [Value Measure] 

    )