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

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

Reply
Anonymous
Not applicable

Calculated column: Divide fixed number by number of rows with same ID

Hi all,

 

Imagine a table like this:

 

Capture.PNG

 

I want a calculated column to divide a fixed number (In this example 20) with the Count of Job ID's per Project ID.

 

In above example :

Project ID 1 has 4 distinct Job IDs. Therefore each Job ID is 5 (20 / 4)

Project ID 2 has 8 distinct Job IDs. Therefore each Job ID is 2.5 (20 / 😎

 

How do I achieve that?

 

 

 

2 ACCEPTED SOLUTIONS
Tahreem24
Super User
Super User

@Anonymous Try this measure:

MEASURE = 
VAR perJOB_ = CALCULATE(COUNT(Table[Job ID],ALLEXCEPT(TableName,ProjectID))
RETURN DIVIDE(20,perJOB_)

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

Tahreem24
Super User
Super User

@Anonymous , Check the screen shot of your scenario:

Capture.JPG

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

2 REPLIES 2
Tahreem24
Super User
Super User

@Anonymous , Check the screen shot of your scenario:

Capture.JPG

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Tahreem24
Super User
Super User

@Anonymous Try this measure:

MEASURE = 
VAR perJOB_ = CALCULATE(COUNT(Table[Job ID],ALLEXCEPT(TableName,ProjectID))
RETURN DIVIDE(20,perJOB_)

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

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.