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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Number of saturdays and sundays between two dates

Hi,

 

I have two dates, a start datetime 29-04-2019 15:00:00 and an end datetime 04-05-2019 15:00:00, is it possible to make it count how many saturdays and sundays i have between these two dates, so in this case i have one saturday, and if the end datetime was 05-05-2019 15:00:00, i would have one sundays aswell.

Its fine with two columns one for saturdays and one for sundays.

 

Best regards ML

1 ACCEPTED SOLUTION
ZunzunUOC
Resolver III
Resolver III

Hi @Anonymous , I advice the next:

 

I would create a calendar table with the next columns:

Date (maybe autocalendar)

Saturday= SWITCH(WEEKDAY(Calendario[Date]);7;1)

Sundays= SWITCH(WEEKDAY(Calendario[Date]);1;1)

 

Then, on your table, create the next calculated columns:

 

NumSat = CALCULATE(SUM(Calendario[Saturday]);DATESBETWEEN(Calendario[Date];Table1[STARDATE];Table1[ENDDATE]))

 

NumSun = CALCULATE(SUM(Calendario[Sunday]);DATESBETWEEN(Calendario[Date];Table1[STARDATE];Table1[ENDDATE]))

 

Best Regards,
Miguel

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
ZunzunUOC
Resolver III
Resolver III

Hi @Anonymous , I advice the next:

 

I would create a calendar table with the next columns:

Date (maybe autocalendar)

Saturday= SWITCH(WEEKDAY(Calendario[Date]);7;1)

Sundays= SWITCH(WEEKDAY(Calendario[Date]);1;1)

 

Then, on your table, create the next calculated columns:

 

NumSat = CALCULATE(SUM(Calendario[Saturday]);DATESBETWEEN(Calendario[Date];Table1[STARDATE];Table1[ENDDATE]))

 

NumSun = CALCULATE(SUM(Calendario[Sunday]);DATESBETWEEN(Calendario[Date];Table1[STARDATE];Table1[ENDDATE]))

 

Best Regards,
Miguel

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

I have a two coloumns start date and end date, i want to create a new coloumn and calculate how many fridays are there.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors