Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello! I would like some help with dax. I need to calculate the percentage that is absent. For this I have a table that stores people who have been absent from work:
| Date | Person ID | Code for cause of absence | Code for organisation | Period |
| 2021-09-01 | 123 | A | 1200 | 202109 |
| 2021-09-01 | 345 | A | 1350 | 202109 |
| 2021-09-01 | 678 | B | 1250 | 202109 |
| And so on | And so on | And so on | And so on | And so on |
I also have a table with all employees:
| Period | PersonID | Code for organisation |
| 202109 | 123 | 1200 |
| 202109 | 345 | 1350 |
| 202109 | 678 | 1250 |
I made a measure that calculates how many are absent, and it looks like this: number absent =DISTINCTCOUNT('table_absence'[PersonID]).
I also have a measure that counts all employees.
Now I want a measure that calculate the percentage that is absent per day, but the problem is that first table is per day and the other one is per month.
I tried with this but it does not work:
Solved! Go to Solution.
Hi, @Anonymous
Please check the following methods.
number absent = DISTINCTCOUNT('table_absence'[Person ID])absence per day (%) =
CALCULATE(DIVIDE([number absent],COUNT(employees[PersonID])),FILTER(ALL(employees),[Period]=SELECTEDVALUE(employees[Period])))
Regarding your other question, you need to provide a little more example data, which I fail to understand at the moment. You can be informed of the output you expect.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
Please check the following methods.
number absent = DISTINCTCOUNT('table_absence'[Person ID])absence per day (%) =
CALCULATE(DIVIDE([number absent],COUNT(employees[PersonID])),FILTER(ALL(employees),[Period]=SELECTEDVALUE(employees[Period])))
Regarding your other question, you need to provide a little more example data, which I fail to understand at the moment. You can be informed of the output you expect.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 32 | |
| 31 | |
| 20 | |
| 13 | |
| 12 |