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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MostafaGamal
Helper V
Helper V

Average measure in power BI

Hi All,

If i have set of values ( 1, 2 , 2 ,4 ) i want to make a measure to take an average without decimal ( i mean the value to be 2 not 2.25 and so on ) 

1 ACCEPTED SOLUTION

@MostafaGamal ,

 

Try this one:

 

_Convert = ROUND(AVERAGE('Table'[Column1]), 0)

 

https://docs.microsoft.com/en-us/dax/round-function-dax

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

12 REPLIES 12
camargos88
Community Champion
Community Champion

@MostafaGamal ,

 

Try this measure:

 

_Avg = INT(AVERAGE('Table'[Column1]))

 

https://docs.microsoft.com/en-us/dax/int-function-dax

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



@camargos88  thanks it works fine but it converts 3.75 to 3 i want it to convert it to 4 ( the nearst value above or below ) 

@MostafaGamal ,

 

Try this one:

 

_Convert = ROUND(AVERAGE('Table'[Column1]), 0)

 

https://docs.microsoft.com/en-us/dax/round-function-dax

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



@camargos88 it gives me the same result 

@MostafaGamal ,

 

Capture.PNG



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



 

@camargos88 it give me this 

 

Capture.PNG

@MostafaGamal ,

 

Can you send me the values ?



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



@camargos88  this measure will work on a large set of data the values in the data are ( 1,2,3,4 ) the this values will be repeated every day at least 100 

And I want the average to be the nearest value 

If it 3.7 to be 4

If it 3.2 to be 3 

@MostafaGamal ,

 

I don't think it depends on the number os values, on it's the average.

 

See the documentation about this function:

Capture.PNG



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



@camargos88  that's what I'm trying to say that the set of values I use right now will not affect the average 

Do you think there is an error in the formula or I use it wrong ? 

@MostafaGamal ,

 

Try with these values:

1,2,2,4,8,5.5

 

It should return an average of 3.75...with the measure should be 4.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



@camargos88 thanks it works now 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors