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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

% 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
Anonymous
Not applicable

 

[% 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
Community Champion
Community Champion

@Anonymous 

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)
 

Anonymous
Not applicable

 

[% 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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.