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
VivekGupta
New Member

How to create measure in Project table to calculate the Progress%OfAllTheTasks related to a Project?

Hi,

 

I want to create a measure in Project table to calculate the Progress % of all the Tasks related to a Project.

 

I have 2 tables:

 

Project table: ProjectId, Name, StartDate, EndDate 

 

Task table: TaskId, ProjectId, Name, State, StartDate, EndDate (State: New, Active, Completed)

 

Project table can contain multiple projects. A project can have multiple tasks. Task table can contain multiple projects.

 

Formula to used for a given project = (Count of Completed Tasks/Count of Total Tasks)*100

 

Please let me know how to create the measure using the above formula in Project table.

 

Thanks.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @VivekGupta ,

 

Based on your description, you can create a measure as follows.

My test table:

v-yuaj-msft_0-1607045855946.png

 

v-yuaj-msft_1-1607045855948.png

 

 

Measure = DIVIDE(

                  CALCULATE(COUNT(Task[TaskId]),'Task'[State]="Completed"),

                  CALCULATE(COUNT('Task'[TaskId]),ALL('Task')),0)*100

 

Result:

v-yuaj-msft_0-1607045932173.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @VivekGupta ,

 

Based on your description, you can create a measure as follows.

My test table:

v-yuaj-msft_0-1607045855946.png

 

v-yuaj-msft_1-1607045855948.png

 

 

Measure = DIVIDE(

                  CALCULATE(COUNT(Task[TaskId]),'Task'[State]="Completed"),

                  CALCULATE(COUNT('Task'[TaskId]),ALL('Task')),0)*100

 

Result:

v-yuaj-msft_0-1607045932173.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

camargos88
Community Champion
Community Champion

@VivekGupta ,

 

Try this measure:

Measure:
DIVIDE(
CALCULATE(COUNT(TASK_TABLE[PROJECT_ID]), STATE = "Completed"),
CALCULATE(COUNT(TASK_TABLE[PROJECT_ID]), ALL(TASK_TABLE[STATE])),
0)


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

Proud to be a Super User!



Thanks for your reply.

 

I would like to know if your solution for the measure will work based on the following conditions:

 

Project table can contain multiple projects. A project can have multiple tasks. Task table can contain multiple projects.

 

Formula to used for a given project = (Count of Completed Tasks/Count of Total Tasks)*100

 

Thanks.

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.