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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Seliebl
New Member

Calculating % Compete with Conditions

Good day, I'm trying to create a new measure that shows the % percent of effective documents out of the total number of documents for a visual in Power BI. These measures seem to be off and I'm not sure what I'm missing. 

 

First, I wanted to select a condition that counted all the items in the list "GOP & S-GOP Traceability", but only filtered on the "Document Status" field where items are tagged as "Effective". Then, I wanted to divide to the total number of "Effective" documents by the Total Number of Documents to get a percentage. 

 

Written out: Total # of Effective Documents/Total # of Documents = % Completed

 

Below is my attempt to write these formulas:

 

  1. Total Completed = CALCULATE(COUNTA('GOP & S-GOP Traceability'[Document Status],FILTER('GOP & S-GOP Traceability'[Document Status]="Effective"
  2. Total = COUNTA('GOP & S-GOP Traceability'[Document Status])
  3. % Completed = [Total Completed] / [Total]

 

I'm using COUNT A because these fields do not contain numbers, but words.

Any help is greatly appreciated. Thanks!

2 REPLIES 2
pmlathrop8cc
New Member

You can try this as well to count total # of documents with effective status over total # of documents.

Eff% = CALCULATE(COUNTA(TableName[Document Status]), TableName[Document Status]="Effective")/ calculate(COUNTA(TableName[Document Status]))

Nathaniel_C
Community Champion
Community Champion

Hi @Seliebl ,
Starting with a table called Trace, try this.

Pct effective =
VAR _num =
    CALCULATE ( COUNTROWS ( Trace ), Trace[Document Status] = "Effective" )
VAR _all =
    COUNTROWS ( ALL ( Trace ) )
RETURN
    DIVIDE ( _num, _all )

  

pct eff1.PNG

 

pct eff.PNG

Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

 





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

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors