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
Zakaria_1980
Post Patron
Post Patron

need help

Hi,

please I have the following example:

what i need is the following as output, is a tabl that shows for me per project ID and per Phase if all task status = Completed , I will get under task status 100% if it includes both completed and in progress, he will calculate the % of completed tasks over total tasks for that project ID & same Phase.

 

Project IDTask statusPhase
1CompletedPH#1
1CompletedPH#1
1CompletedPH#1
1CompletedPH#1
1CompletedPH#1
1CompletedPH#1
1In progressPH#2
1In progressPH#2
1CompletedPH#2
2CompletedPH#1
2CompletedPH#1
2CompletedPH#1
2In progressPH#1
2CompletedPH#2
2CompletedPH#2
2CompletedPH#2
2CompletedPH#2
2CompletedPH#2
2In progressPH#2
2In progressPH#2
2In progressPH#2
2CompletedPH#3
2CompletedPH#3
1 ACCEPTED SOLUTION

Okay, for that you just need to drag these 3 column on the table visual.

Samarth_18_0-1653485453842.png

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

5 REPLIES 5
Samarth_18
Community Champion
Community Champion

Hi @Zakaria_1980 ,

 

You could create a column as below:-

Column =
VAR completed_task =
    COUNTROWS (
        FILTER (
            'Table',
            'Table'[Project ID] = EARLIER ( 'Table'[Project ID] )
                && 'Table'[Phase] = EARLIER ( 'Table'[Phase] )
                && 'Table'[Task status] = "Completed"
        )
    )
VAR total_task =
    COUNTROWS (
        FILTER (
            'Table',
            'Table'[Project ID] = EARLIER ( 'Table'[Project ID] )
                && 'Table'[Phase] = EARLIER ( 'Table'[Phase] )
        )
    )
RETURN
    IF ( total_task = completed_task, 1, DIVIDE ( completed_task, total_task ) )

Refer a attached file.

Output:-

Samarth_18_0-1653475968982.png

BR,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Thanks for this output, but can we have sth simple like this:

 

Project IDPhaseStatus Completion
1PH#1100%
1PH#233%
2PH#175%
2PH#263%
2PH#3100%

@Zakaria_1980 You can adjust your decimals from here.

Samarth_18_0-1653481563211.png

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

The problem is not the format of the decimal but the output itself, i've shared with you the output i need, what i did is that i regrouped by project id and phase to get the status completion %.

 

Okay, for that you just need to drag these 3 column on the table visual.

Samarth_18_0-1653485453842.png

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

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.