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
Hi,
I would like to put # of working days in each month like this image (considering holidays) but i don´t know how to do that...
I would be appreciated if you could help me!! Thanks.
Solved! Go to Solution.
Please try this expression
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@yugofukuda , Try like
sumx(filter(Calendar, [month]=earlier[Month] && [isworkingday]=earlier([isworkingday]) && [isworkingday]=1 && [Date] <=earlier([Date])),[isworkingday])
@amitchandak @AllisonKennedy
Thank you very much for your help!!
But it didn´t work. Whas should I do??
if it need, i don´t mind if column of "isWorkingday" is deleted (it´s not necessary).
Please try this expression
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Thank you very much!!! but it didn´t work.
The message in Power BI is "A circular dependency was detected: Calendar[IsWorkingDay], Calendar[WorkingDayNumber], Calendar[IsWorkingDay]".
That's weird. Worked in my calendar table. What is the expression used in your IsWorkingDay column? Mine is
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@mahoneypat
Thank you very much for your quick response.
Mine is "IsWorkingDay = IF (NOT('Calendar'[dayname]= "Saturday"|| ('Calendar'[dayname]= "Sunday"))&& COUNTX(RELATEDTABLE('Holidays'),1)<1,1,0)"
When i tried your expression, it worked well but I would like to consider holidays. holidays table is as below.
Please try this one instead that avoids the CALCULATE. Replace 'Date' with 'Calendar' throughout.
WorkingDayNumber =
VAR thisdate = 'Date'[Date]
VAR thismonth = 'Date'[YearMonthnumber]
RETURN
IF (
'Date'[IsWorkingDay] = 1,
COUNTX (
FILTER (
'Date',
'Date'[Date] <= thisdate
&& 'Date'[YearMonthnumber] = thismonth
&& 'Date'[IsWorkingDay] = 1
),
1
)
)
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
mahoneypat
Hi, I made a column for holidays and It worked well by using your expression. Thank you very much!!
@mahoneypat
Thank you very much but it didn´t work well...
I guess my expression in iswokingday (considering Holidays) isn´t good. in your case, it works well??
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |