The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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?
Solved! Go to Solution.
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.
Hello @Anonymous ,
I had to redo some calculations, but based on the measurements you sent me, it worked.
Thanks a lot for the help!
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.
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
9 | |
7 |