cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
raks3
Helper V
Helper V

% of Completed

Hi Team,

I want to select the % of completed out off status.

User needs Slicers as Project column.

If user selects A from Slicer = total completed / Total count.

ProjectSub Project Planned Start DatePlanned Closed DateActual Start DateActual Closed DateStatus
AAA1/12/20201/12/20211/2/2021 Completed
AAB1/1/20201/6/20201/4/20201/10/2020Inprogress
AAC1/6/20211/12/2021  Completed
BBA1/5/20211/12/2021  Delayed
BBB1/4/20201/6/20201/6/20201/8/2021Completed
BBC1/3/20211/5/20211/4/20211/6/2021Inprogress
BBD1/3/20211/5/20211/4/20211/6/2021Inprogress
1 ACCEPTED SOLUTION
daxer
Solution Sage
Solution Sage

 

[% Completed] =
DIVIDE(
    CALCULATE(
        COUNTROWS( T ),
        KEEPFILTERS( T[Status] = "completed" )
    ),
    COUNTROWS( T )
)

 

Warning:

Using one-table models can lead to wrong numbers being calculated even by good formulas. Please always use star schemas.

View solution in original post

2 REPLIES 2
themistoklis
Super User II
Super User II

@raks3 

Try the following:

 

Measure  = 

var completed = CALCULATE( COUNTROWS('Table'), Table[Status] = "Completed" ) 

var total =CALCULATE( COUNTROWS('Table'), ALLEXCEPT(Table, Table[Project] ) 

Return

DIVIDE(completed , total)
 

daxer
Solution Sage
Solution Sage

 

[% Completed] =
DIVIDE(
    CALCULATE(
        COUNTROWS( T ),
        KEEPFILTERS( T[Status] = "completed" )
    ),
    COUNTROWS( T )
)

 

Warning:

Using one-table models can lead to wrong numbers being calculated even by good formulas. Please always use star schemas.

View solution in original post

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors