Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Weekend Calculation- Select startdate & enddate - weekend calculate (Saturday & sunday count 1(one))

I need weekend calculation based on selection of start date and enddate and saturday and sunday count one


ClearCollect(DateRange,AddColumns(FirstN([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59],DateDiff(DataCardValue22.SelectedDate, DataCardValue21.SelectedDate, Days) + 1),"Day","Day" & (Value + 1),"Date",DateAdd(DataCardValue22.SelectedDate, Value, Days),"Weekend",If(Weekday(DateAdd(DataCardValue22.SelectedDate, Value, Days))=1 ||Weekday(DateAdd(DataCardValue22.SelectedDate, Value, Days))=7,1,0)));




currently i using above code but that is only calculated the till 9 weekend i want dynamic not fixed.

Community Support
Community Support

Hi @AmitSaraswat,


I have made a test on my side, if you want to calculate the weekend (Saturday&Sunday count 1 one) between the two different dates dynamically, I afraid that there is no way to achieve your needs in PowerApps currently.


If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:


In addition, I don't think the formula that you provided could calculate weekend (Saturday&Sunday count once) between two different dates. If the dates between the startdate and the enddate contains Saturday and Sunday, the formula that you provided would count weekend twice (One for Saturday, one for Sunday).


Best regards,




Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,086)