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
elponce
Frequent Visitor

Building a Percentage Table in Power BI

Hello!

 

I have the columns below (first Table) that I am trying to use to calculate a percentage of items completed "On-Time" per month and year by using the formula: # Items On-Time/ (# Items "On-Time" + "Late")*100. The second table shows what I am trying to accomplish here. Is it possible to do this in Power BI? Thank you in advanced!!

 

Capture.JPGCompliance.JPG

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

I would create a measure like so (please be aware that it is not tested, because I didn't recreate a table from your example):

Compliance = 
CALCULATE(
count('table'[eventid])
,'table'[status] = "On-time"
)
/
CALCULATE(
count('table'[eventid]),
ALL('table'[status])
)

Hopefully this provides the solution you are looking for.

 

Regards

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

Try this.  In your Table visual, drag Year and Month in the Row labels.  Write this measure

 

=CALCULATE(COUNTROWS(Data),Data[Enter Time Status]="On-Time")/COUNTROWS(Data)

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
TomMartens
Super User
Super User

Hey,

 

I would create a measure like so (please be aware that it is not tested, because I didn't recreate a table from your example):

Compliance = 
CALCULATE(
count('table'[eventid])
,'table'[status] = "On-time"
)
/
CALCULATE(
count('table'[eventid]),
ALL('table'[status])
)

Hopefully this provides the solution you are looking for.

 

Regards

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Thank you for your help! This works!

Helpful resources

Announcements
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.