Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
michael_knight
Post Prodigy
Post 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! 

 

Capture.PNG

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

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

https://www.dropbox.com/s/oaq85z3v79hlq77/dates.pbix?dl=0 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

4 REPLIES 4
michael_knight
Post Prodigy
Post Prodigy

Good stuff, thank you @Jihwan_Kim 

Jihwan_Kim
Super User
Super User

https://www.dropbox.com/s/oaq85z3v79hlq77/dates.pbix?dl=0 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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

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.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.