Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello all.
I have a data-set that looks like the below. I have labelled the table names (obviously the real data-set is much bigger).
I have the absences for each user, on a per month basis.
What I need to do is be able to track working days per month per person over time using a piece of DAX - can anyone help please?
Thanks
Adam
Solved! Go to Solution.
Assuming the absence table has month year and only one record per month per employee.
You can get no of working days in the absence table
Working days = countx(filter(datetable,datetable[Is Working Day] ="TRUE" && format(datetable[date],"MMMM-YYYY")=absence[month]),datetable[date])
Hi @Anonymous ,
check this quick an dirty PBIX 😁
Regards,
Marcus
Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
Hi @Anonymous ,
You could refer to the following DAX:
Measure =
CALCULATE (
COUNT ( 'Date Table'[Date] ),
ALLSELECTED ( 'Date Table' ),
FILTER ( 'Date Table', 'Date Table'[Is Working Day] = TRUE () )
)
- CALCULATE (
SUM ( 'Absences Table'[Days Off] ),
USERELATIONSHIP ( 'User Table'[Name], 'Absences Table'[Name] )
)
Hi @Anonymous ,
check this quick an dirty PBIX 😁
Regards,
Marcus
Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
Assuming the absence table has month year and only one record per month per employee.
You can get no of working days in the absence table
Working days = countx(filter(datetable,datetable[Is Working Day] ="TRUE" && format(datetable[date],"MMMM-YYYY")=absence[month]),datetable[date])
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
97 | |
80 | |
67 | |
63 |
User | Count |
---|---|
147 | |
110 | |
108 | |
85 | |
64 |