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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
Resident Rockstar
Resident Rockstar

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.