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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
gauravnarchal
Post Prodigy
Post Prodigy

Count the number of days and weekends

How can I count the number of days and weekends as of today in a month?

 

Saturday & Sunday are considered the weekend.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @gauravnarchal ,

 

I have created a Calendar table for test, and on my side, today is 2022/4/5.

Eyelyn9_0-1649142092882.png

Please create measures:

Working days = CALCULATE( COUNTROWS(FILTER('Calendar',[Date]<=TODAY())) ,FILTER('Calendar', WEEKDAY([Date],2) in {1,2,3,4,5}))
Weekends = CALCULATE( COUNTROWS(FILTER('Calendar',[Date]<=TODAY())) ,FILTER('Calendar', WEEKDAY([Date],2) in {6,7}))

Output:

Eyelyn9_2-1649142206295.png

 

Best Regards,
Eyelyn Qin
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

3 REPLIES 3
Anonymous
Not applicable

Hi @gauravnarchal ,

 

I have created a Calendar table for test, and on my side, today is 2022/4/5.

Eyelyn9_0-1649142092882.png

Please create measures:

Working days = CALCULATE( COUNTROWS(FILTER('Calendar',[Date]<=TODAY())) ,FILTER('Calendar', WEEKDAY([Date],2) in {1,2,3,4,5}))
Weekends = CALCULATE( COUNTROWS(FILTER('Calendar',[Date]<=TODAY())) ,FILTER('Calendar', WEEKDAY([Date],2) in {6,7}))

Output:

Eyelyn9_2-1649142206295.png

 

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

VijayP
Super User
Super User

@gauravnarchal 

Try this

CALCULATE(Countrows(datesdim), all(datesdim), format(datedim[date],"DDD") = "Sat" && format(datedim[date],"DDD") = "Sun"))




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Hi @VijayP - I need to count the number of days and weekends as of today of a month?

 

The answer provided is not working as I am not getting the desired result.

 

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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