aether
aether

Reputation: 1

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.

Upvotes: 0

Views: 3455

Answers (1)

Gangula
Gangula

Reputation: 7334

I will be able to give you a better answer if I can see how yo grouped it.

But I tried AVERAGEX in one of my tables, and its working fine. Below if the formula:

=GROUPBY('Table','Table'[Column1],"ABC",AVERAGEX(CURRENTGROUP(),'Table'[Amount]))

Upvotes: 0

Related Questions