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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
pedromenu
Regular Visitor

Count Employees

I have a spreadsheet with employee hours in hours. When there are no entry and exit records, it is considered a failure. In this case, I need to make two cards:

1) number of days where more than 20% of employees were late

2) Create a card with the number of employees who have a percentage of days late greater than or equal to 50%.

 

How can I do this?Screenshot_3.jpg

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @pedromenu ,

Please have a try.

Create a measure.

Late Days = 
           COUNTROWS(FILTER('Table', 'Table'[Late] > 0)) / DISTINCTCOUNT('Table'[Date]) * 100

This formula calculates the percentage of days where more than 20% of employees were late. You can then create a card visual and add the "Late Days" measure to it.


Create the 2nd measure.

Late Employees = COUNTROWS(FILTER('Table', 'Table'[Late] / 'Table'[Total] >= 0.5))

This formula calculates the number of employees who have a percentage of days late greater than or equal to 50%. You can then create another card visual and add the "Late Employees" measure to it.

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
pedromenu
Regular Visitor

Hello @Anonymous  ,

I had to redo some calculations, but based on the measurements you sent me, it worked.
Thanks a lot for the help!

Anonymous
Not applicable

Hi @pedromenu ,

Please have a try.

Create a measure.

Late Days = 
           COUNTROWS(FILTER('Table', 'Table'[Late] > 0)) / DISTINCTCOUNT('Table'[Date]) * 100

This formula calculates the percentage of days where more than 20% of employees were late. You can then create a card visual and add the "Late Days" measure to it.


Create the 2nd measure.

Late Employees = COUNTROWS(FILTER('Table', 'Table'[Late] / 'Table'[Total] >= 0.5))

This formula calculates the number of employees who have a percentage of days late greater than or equal to 50%. You can then create another card visual and add the "Late Employees" measure to it.

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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