Forum Discussion
Calculating working days
- 5 years ago
v-robertq-msft , I think I've found it!
The date table and workingday column are the samen, but the working days delta has become the following:
as you can see, the one delayed shipment in the overview now gets a positive number. I should be able to use this to measure delayed shipments within a tolerance finally get the performance based on working days! :):):)
lbendlin as PaulusD mentioned, he already have a calendar dimension and adding this weekday in that dimension. I think he is on the right track.
PaulusD Provide more details in what case it is not returning the data. I see you are filtering calendar dimensions from the SO_DEL table which will give only those dates from the Calendar table that exist in the SO_DEL table, assuming these two tables have a relationship. Any reason why you are doing that?
Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- PaulusD5 years agoResolver II
Hi parry2k ,
From what i've read, it should be counting the rows in the datetable (dimension table), where the start date and end date for the countrows action is determined by the dates passed on from the fact table.
For some dates this works fine:
but for other dates is just completely misses the apex:
now the date entered in the source is incorrect, but the point is the results sould reflect the number of days over the years between the dates.
The datetable is built using the calendarauto function, so i'm pretty sure all dates from the earliest found up to the latest found are in that table.
I need to be able to rely on the forumula as i'm measuring performance based on dates.