Forum Discussion
Network days from a certain date
Hi All,
I have a query on some work which has previously been done on Excel and now it has to be done on Power BI. It is just to calculate the number of network days from a joining or leaving dates of some resources.
In simple terms, the way it should work as e.g. if there is no date in FROM_DATE and TO_DATE columns in Table A or if these are blanks, then it should give the normal Network days e.g for April it should show Network days as 22 and for May it should show 23 and so on for the resources where these two date columns are blank, but for the resourceID's where they have the dates in either the FROM_DATE and TO_DATE columns in Table A, then it should calculate the Network days after the FROM_DATE or before the TO_DATE for that resource for that specific month e.g. Let's say a resource's TO_DATE is showing 26th June 2024 and FROM_DATE column is showing blank for that particular resource , so it should calculate the Network days for June month starting from the first of June month till 26th June 2024 which will be 18 Network days. Similarly e.g if the resource's FROM_DATE is 26th June 2024 and TO_DATE column is showing blank for that particular resource, then it should calculate Network days from 26th June 2024 till the end of June month, which will be only 3 Network days.
Help will be much appreciated.
Thanks & regards
see attached
12 Replies
- lbendlinSuper User
Add a column to the Dates table in your data model that clearly identifies the working days for your scenario (by region/country etc)
- samoberoiHelper III
Hi Ibendlin,
Normal network days is working fine, but what if let's say a resource's TO_DATE is showing 26th June 2024 and FROM_DATE column is showing blank for that particular resource , so it should calculate the Network days for June month starting from the first of June month till 26th June 2024 which will be 18 Network days. Similarly e.g if the resource's FROM_DATE is 26th June 2024 and TO_DATE column is showing blank for that particular resource, then it should calculate Network days from 26th June 2024 till the end of June month, which will be only 3 Network days. It doesn't filter number of capacity in days for a few specific resource.
Thanks- lbendlinSuper User
What is your definition of weekend? Are there any holidays in the affected period?
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.