Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

list.number Act weird

Hi guys, I am trying to generate a list of date to count number of weekend within a list. I tried to find any predefined function serve the purpose but ended up realising there is no such Function (...
  • Jimmy801's avatar
    Jimmy801
    5 years ago

    Hello Anonymous 

     

    this would be the custom function

     

    (DeliveredDate as date, TransitTime as number)=>  List.Count(List.Select(List.Dates(Date.AddDays(DeliveredDate, (TransitTime*-1)+1), TransitTime,#duration(1,0,0,0)), each Date.DayOfWeek(_)>4))

     

    If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
    Kudoes are nice too

    Have fun

    Jimmy