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.
Hi,
I'm trying to calculate the total number of working days in the current month. Can anybody suggest a measure/function that would do this?
Thanks
Pete
Solved! Go to Solution.
Hi Pete,
You should use the following Dax codes in your date dimension by adding custom columns:
Day of Week = WEEKDAY('Date'[Date];2)
WorkDay = IF(OR('Date'[Day of Week] =6; 'Date'[Day of Week] = 7); "No"; "Yes")
Then you need to create the following measure:
Workdays = CALCULATE(COUNT('Date'[WorkDay]); FILTER('Date'; 'Date'[WorkDay] = "Yes"))
This is the result:
Hope this helps!
Kind Regards,
Jelte
Hi Pete,
You should use the following Dax codes in your date dimension by adding custom columns:
Day of Week = WEEKDAY('Date'[Date];2)
WorkDay = IF(OR('Date'[Day of Week] =6; 'Date'[Day of Week] = 7); "No"; "Yes")
Then you need to create the following measure:
Workdays = CALCULATE(COUNT('Date'[WorkDay]); FILTER('Date'; 'Date'[WorkDay] = "Yes"))
This is the result:
Hope this helps!
Kind Regards,
Jelte
Thanks Jelte.
Pete
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 |
---|---|
98 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |