Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I would like to put # of working days as below but I don't know how to do that.
For example, in the case of sep of 2019, there were only 18 working days but I would like to put 22 on the final working day.(other months as well). I would be appreciated if you could help me.
Thank you!!
Solved! Go to Solution.
Here is the SUMX version of it to add up the values in your IsWorkingDay column.
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.
I saw that and added the IF to address it. Just remove it and use this as the return
RETURN
22 - wdafterthisdate
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.
@yugofukuda - First, this might help https://community.powerbi.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/367362#M109
But, more specifically to your case, maybe
Column =
VAR __Calc = <some calculation>
RETURN
IF([Date] = EOMONTH([Date],0),22,__Calc)
Can you just add 4 to your WorkingDayNumber column? If the number to add depends on the month, you could calculate that as a variable in your expression, and then add that variable. What is the logic to add 4?
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
Thank you for your help! the number to add depends on the month (because number of working days depends on month) so i don't know how to resolve this matter...
Perhaps get a little more elaborate with the return statement:
Column =
VAR __Calc = <some calculation>
RETURN
IF([Date] <> EOMONTH([Date],0),
__Calc,
SWITCH(MONTH([Date]),
1,23,
2,20,
3,23,
4,22,
5,23,
6,22,
7,23,
8,23,
9,22,
10,23,
11,22,
12,23
)
)
@Greg_Deckler
Thanks !! but it didn't work. I would like to consider holidays as well.
@yugofukuda - Also, Net Work Days - https://community.powerbi.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/367362#M109
Was specifically designed to do this and there is a version that accounts for holidays.
@yugofukuda - Let's back up because it seems like everyone is just spinning their wheels on this. @yugofukuda - Please be very specific with what you are looking to achieve. How are you arriving at your working days, specifically? How do you end up with 22 for September? What are your values for the other months? Are all months the same every year? Post sample data as text and also post the expected results of that sample data and explain why they should be what they are.
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
@yugofukuda I believe this expression gets the desired result (assuming you have a Month and Year column in your Date table).
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
Thank you very much for your quick response!!It's very near to what I want to do!!
But there is one problem. What I would like to do is to eliminate holidays. How can I eliminate holidays by using your expression?
Here is the SUMX version of it to add up the values in your IsWorkingDay column.
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.
Sorry, please help me. When the column is blank, I would like to use previous data as below. Could you tell me how to create the data?? Thank you very much!!
I saw that and added the IF to address it. Just remove it and use this as the return
RETURN
22 - wdafterthisdate
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.
@yugofukuda
Does your rightmost column exist or are trying to create and include the "22" at the end as you explained?
Provide data in Excel or Text format.
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Fowmy
Thank you for your reply!! sorry, i can´t share my data.
It doesn´t exsit the column yet and i´m trying to creat that.
Not sure why you would want to do that, but nothing is stopping you from ignoring the actual result and replacing it with a constant.
What are you trying to achieve?
@lbendlin
Thank you for your reply.
I would like to forecast the result with accuracy and to align the 22 on the final working day is very important to do that because for example, % of change is different on final working day and other working days.
The graph i would like to make is as below.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.