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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jabrillo
Helper I
Helper I

Calculating Average

I have this table:

ProjEmpDeptYr and MoAlloc Pct
P1Adam WestHRJanuary 202410%
P1Adam WestHRFebruary 202410%
P1John DoeSalesJanuary 202420%
P1John DoeSalesFebruary 202430%
P1Kelly ShawHRFebruary 202450%
P2Kelly ShawHRMarch 202430%
P2Kelly ShawHRApril 202440%

One Dept can have more than one Emp. I tried to calculate the average allocation with:

Calculate(average(Alloc Pct), allexcept(table, table(Proj), table(Emp)).

I need to create a table visual that summarizes the allocation averages by Dept, something like this:

DeptEmp CountProj CountAlloc
HR2295%
Sales1125%

HR has 60% = Adam, 10% avg; Kelly, 50% avg + 35% avg

Sales has 25% = John, 25% avg.

Any help will be appreciated.

4 REPLIES 4
ryan_mayu
Super User
Super User

@jabrillo 

you can try to create a new column

alloc = CALCULATE(AVERAGE('Table'[Alloc Pct]),ALLEXCEPT('Table','Table'[Proj],'Table'[Emp],'Table'[Dept]))/CALCULATE(COUNT('Table'[Alloc Pct]),ALLEXCEPT('Table','Table'[Proj],'Table'[Emp],'Table'[Dept]))

then you can display the table visual directly.

11.PNG

 

pls see the attachment below





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

Proud to be a Super User!




_AAndrade
Super User
Super User

You want to calculate the average by emp and Dep and after sum this value by dep?
HR has 60% = Adam, 10% avg +  Kelly, 50% avg !?





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




I want to average by emp and proj, then sum this value by dept.

Try this measure:

_AAndrade_0-1708099526173.png


The output will be:

_AAndrade_1-1708099590503.png

 





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.