cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

How to make a datediff to not considerer the sunday or some workaround

It's pretty straight foward, i need a datediff that doesnt considerer the times that pass on sunday. 

 

Vieiraguilherme_0-1606476037599.png

 

This will be applyed through the year, so, if an item got trigged in january, i need to know how many time has past disconsidering the sunday, because sunday inst a worked time. 

1 ACCEPTED SOLUTION
Community Support
Community Support

@Vieiraguilherme


I guess you wanted to ignore both Sunday and Saturday, that's the result shown in the chart. You cannot use datediff to filter on Sunday and Saturday, try to continue creating the following columns:

Diff days = COUNTX(FILTER(CALENDAR([Trigger],[Today]),WEEKDAY([Date],2)<>6 && WEEKDAY([Date],2)<>7),[Date])

Diff hours = [Diff days] * 24

datediff time.JPG


Paul Zheng _ Community Support Team
If this post helps, please accept it as the solution to help the other members find it faster.

View solution in original post

2 REPLIES 2
Community Support
Community Support

@Vieiraguilherme


I guess you wanted to ignore both Sunday and Saturday, that's the result shown in the chart. You cannot use datediff to filter on Sunday and Saturday, try to continue creating the following columns:

Diff days = COUNTX(FILTER(CALENDAR([Trigger],[Today]),WEEKDAY([Date],2)<>6 && WEEKDAY([Date],2)<>7),[Date])

Diff hours = [Diff days] * 24

datediff time.JPG


Paul Zheng _ Community Support Team
If this post helps, please accept it as the solution to help the other members find it faster.

View solution in original post

Super User IV
Super User IV

@Vieiraguilherme , please find the attached file to check workday diff, that does not consider, Saturday ad Sunday. You can change the column in the date table to exclude only Sunday 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors