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
ljavadova
New Member

How to calculate separate average by groups in Power BI?

I am trying to calculate average for different companies. Different average value for each company.
But it's calculating for each row(?). For example, For one company we have 6 values: 5,0,0,5,0,0.
Logically, average EQ to 1.7
Power BI shows 5.
I grouped each company to make it easier to calculate the amount and divide by the number of cells belonging to each value. Also, I did it directly through AVERAGEX, and also, through the AVERAGE(CALCULATE - SUM).

"NEW COLUMN NAME" = AVERAGE(
KEEPFILTERS(VALUES('Table1'[Contractor(groups)])),
CALCULATE(AVERAGE('Table1'[Event Identification]))
)

 I expect: 5,0,0,5,0,0 = 1.7 And calculations (output) will be provided for each group.

1 ACCEPTED SOLUTION

You should write a measure, not a column. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @ljavadova ,

Have you solved your problem?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please share your data sample with table format and your desired output so that we could help further on it.

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

You should write a measure, not a column. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

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.