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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.