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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
StickyToffeePud
Regular Visitor

Trying to create a simple measure of Projects per Staff numbers

Sorry, this is first time posting. I am a self taught PowerBI dashboard creator and I am trying to create a simple 'projects per staff number' calculation for my companies dashboard. I feel it should be easy but the numbers keep being wrong, any help would be greatly appreciated, it's been quite frustrating. Details below.

 

The Data: I have two sources of data. A Direct Query into a SQL database (DATA1)  that lists all projects, with columns for Department etc. and a spreadsheet (DATA 2) with a column for department and staff numbers. 

 

The solution: I want to create a new measure of projects per staff numbers (PPP) and have tried creating a new measure under the spreadsheet data source with code along the lines of:

Projects per Person (PPP) =
VAR Depart_Project_Count =
    COUNTAX(FILTER(DATA1[ProjectType]="PROJECT"),DATA1[Department])
VAR Staff_Count =
   COUNTAX('DATA2','DATA2'[Department])    
RETURN
    ( Depart_Project_Count / Staff_Count )

 

No errors are produced when I run it but gets the numbers wrong, see table belwo: 

StickyToffeePud_0-1738066611040.png

For Glasgow the number PPP should be 3.14 ish (44/14) no 22. 

 

Any help or pointers would be greatly appreciated. Thanks

 

4 REPLIES 4
bhanu_gautam
Super User
Super User

@StickyToffeePud , Try using DAX
Projects per Person (PPP) =
VAR Depart_Project_Count =
CALCULATE(COUNTROWS(DATA1), DATA1[ProjectType] = "PROJECT")
VAR Staff_Count =
CALCULATE(SUM(DATA2[StaffNumber]))
RETURN
DIVIDE(Depart_Project_Count, Staff_Count)

 

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thanks for the quick response, but unfortunately I have just tried the above and it produced different but still incorrect results, see table below. Although weirdly, the result for Castleford is pretty close (but none of the others are)

 

StickyToffeePud_0-1738075949550.png

 

Azadsingh
Helper I
Helper I

Hi @StickyToffeePud , Please try below approach:

 

Create below measures: 

Total Projects = COUNTROWS(DATA1)

Total Staff = SUM(DATA2[Staff Numbers])

Projects Per Staff =DIVIDE([Total Projects],[Total Staff],0)

 

Let me know if it worked for you, if not please send some sample data.

Hi, Thanks for the quick response. I did try this but it just gave blanks for the answer. Here is a screen grab of Data 1: 

StickyToffeePud_0-1738077688640.png

And here is a screen grab of Data 2

StickyToffeePud_1-1738077719604.png

Please let me know if you need anything else, thanks again. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.