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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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