Power Bi DAX: Weekly Column for only working days - powerbi

I need help working out the working days so i can calculate a weekly target by:
target / Working days in a Month (Total) = Daily Target
Daily Target * Working days in a week = Weekly Target
My target is set on the 1st of the month so that is why i need to spread it across weeks.
My columns:
Date
Month
Year
Week Number (1-52)
Week day (1-7)
Weekinmonth
Working day (1 & 0)
Day in Month (1-31)
What i need:
I need to list out the dates filtering out the working dates as another column (Does not show the dates that are on the weekend, these will be blank), need to return the working days as 1-31 as another column (same as the DAY function) so i can make a MAX formula to get the Working days in a month to by divided by the target to make the daily target. I am unsure how i will get the Working days in a week.
Can anyone help??

Related

DAX Function to Return the Month Number of the Previous Month

I have a calculation where I need to divide the budget by 12 and then multiply by the number of months passed not including this month.
So for this month, I have DIVIDE([GP Budget $],12)*4. But I obviously don't want to have to change the calculation every month. My calendar table has a month number so I was hoping to return that value depending on what the previous month is. I'm sure there are about a thousand ways to do this but I'm still new to BI and my Bing searches are failing me.

Count number of days between multiple dates based on measure and sum each week

So, strange one to explain...
I have a table with the start dates of each person in project (each start day is the first Monday of the week)
I want to know how many people were in the project on any given week.
If I select two weeks in a slicer, for example
Week1
Week3
And there were 10 people in week 1 and 30 in week 3 the total should be 40.
How do I build a measure to do this.
Essentially I'm asking it to count the number of rows(project members) where the start date is >= each selected date and sum each individual result.
I hope this has made sense unable to share much due to work red tape
Thanks
Lloyd
I would do this in the following way:
Create a bin for the work week
Create a measure to count the bin from step 1.

How to divide project hours over project length with a known end date in Power BI

I'm trying to figure out how to spread the estimated hours for a project over the length of that project with a known end date.
Example, I have Project 001, it is 600 hours, and it is a six-month project that is due to release June 2020. Each of these values (project identifier, hours, length, and release date) are separate columns in a database.
In this example, Project 001 would add 100 hours to each month from January to June. If Project 002 had 300 hours with the same length and release date, now each month would have 150 hours.
The end goal is to get a forecast of how many hours we expect in each month for all the projects we have to determine the overall capacity demands for the month. So we'd have something like a bar chart that shows the total hours demand for each month based on the projects that will impact that month. Or we'd have a bar chart that shows the remaining capacity (fixed monthly capacity minus monthly estimated hours).
I haven't been able to determine how to generate something that will divide the hours backward over the length of the project based on the project end date. I'm still pretty new to Power BI, so I could do with some guidance on this one. I'm well versed in Excel and VBA, I understand the basics of creating measures and some of the ways Power BI "formulas" are written. Any help is much appreciated.
I made a small test table:
I added the column: HoursPerDay
HoursPerDay = Hours[Hours]/ DATEDIFF(Hours[StartDate];Hours[EndDate];DAY)
Next I made a calendar table:
Calendar = CALENDAR(MIN(Hours[StartDate]);MAX(Hours[EndDate]))
I added the measure HoursPerProject to this table:
HoursPerProject = CALCULATE(SUM(Hours[HoursPerDay]);FILTER(Hours;Hours[StartDate] <= VALUES('Calendar'[Date]) && Hours[EndDate] >= VALUES('Calendar'[Date])))
This is the important bit because it checks if it should include the hours for a prject on that day.
When putting this in a stacked column graph, you need to place the HoursPerProject in the value and the Date of calendar on the Axis. Hope this helps you.

Calendar table with changing start date

I work in an educational department where the start date of our academic calendar changes every year. Some years it might be week 9 of the year, some years it might be week 10. There is no formula used to figure out this start date, it's based a combination of factors and is picked by humans.
I want to be able to compare calls received in week 1 of the academic calendar 2017 to calls received in week 1 of the academic calendar 2018 and 2019.
I am using PowerBI desktop and trying to create a calendar table that includes a column "academic calendar week" or similar.
Does anyone have any suggestions on how to offset start date of the calendar by a different number of weeks for each year?

Calculating number of Months from one date to another in power bi

I was wondering if there is a way to calculate how many months it has been from one date to another in Power Bi.
For example the date would be October 1st 2014 and I would want to calculate how many months ago that was to the current date.