Forum Discussion
michael_knight
5 years agoPost Prodigy
Datediff Excluding Sunday
Hi,
Does anyone know how I can do a DateDiff but excluding Sunday? It seems this is easier said than done!
With this example the DateDiff between the two dates is 5. Excluding Sunday it should be 4
This the the PBIX file: https://www.dropbox.com/s/raye0i6xfvr0h9y/dates.pbix?dl=0
Thanks,
Mike
4 Replies
- michael_knightPost Prodigy
Hi,
Thank you for that. I'm wondering, this was only sample data and I'd implement this on multiple DateDiff functions, will I need to create a calendar table for each measure?
Thanks
- Jihwan_KimSuper User
In my opinion, I think one calendar table might be enough if it can cover your business requirement.
The reason why I created the new calendar table is that the existing dates table did not cover all dates in the fact table.
- michael_knightPost Prodigy
Good stuff, thank you Jihwan_Kim