I am trying to work the number of appointments between 2 dates.
The issue arises if the staff member has changed the amount of days worked.
What I want to do is for Staff member ‘J’, I want it to calculate Target Appts between the start and the end date and if no end date exists return Target Appts on or after start date
I’ve reviewed the Time Intelligence course but unable to figure out
Thanks for this!! Exactly what I am looking to do.
This has give rise to another issue though. if you observe in the screenshot, not all staff member’s have an end date.
By connecting the dates table to the end date column, i now have blanks showing in my dates filter. is there a way to avoid this happening besides setting the ‘is not blank’ on the page level filter?
Ok some complexity here that makes it hard to grasp everything, especially without reviewing the model or testing.
With totals, here’s what I recommend, and how I think about things.
Really think about what those formula are doing without any context.
For example
FILTER ( VALUES ( Dates[Day Of Week Name] ),
This part of the formula is iterating through the days in a week, but is not being filtered by any month anymore. So be conscious of this.
Let’s also have a look at the first filter
VALUES ( ‘Access DB Adviser Rostered Days’[Start] ), ’Access DB Adviser Rostered Days’[Start] <= MAX ( Dates[Date] )
Here in the total section your are iterating through every single ‘start’ recorded and evaluating if that is less than the very last date in the date table.
MAX ( Dates[Date] ) - remember this is evaluating the MAX date of every date in the date table (unless you have some other filter I can’t see
Once you’ve filter out dates you don’t need (eventhough it looks like in the total you’re not filter out any dates, because MAX date is evaluating the very last date) you then move into NSW current working days and then evaluate that logic with no context at all.
I had a somewhat similar issue a while ago, here is what I came up with in case it helps: Date of status shift
One change we made in our data that helped is inserting a dummy date of 12/31/9999 for records that were active (i.e., truly didn’t have an end date). This way every record had a start and end date to work with.