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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors