Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
felipesaw
Frequent Visitor

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
1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

Hi  @felipesaw 

 Try like:

Measure = 
DIVIDE(
    SUM(TableName[Value]),
    COUNTROWS(TableName)
)

View solution in original post

3 REPLIES 3
CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1671822266817.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

tamerj1
Super User
Super User

Hi @felipesaw 

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

AVERAGEX ( 

VALUES ( 'Table'[Month] ),

[Value Measure] 

)

 

FreemanZ
Super User
Super User

Hi  @felipesaw 

 Try like:

Measure = 
DIVIDE(
    SUM(TableName[Value]),
    COUNTROWS(TableName)
)

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.