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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Aarti1
New Member

working day

Hi 

i am struggling to count which date is which no. working day in a month?

suppose my date is 9/16/2019,so i want to know which number working day is it?

1 ACCEPTED SOLUTION
rsbin
Community Champion
Community Champion

@Aarti1 ,

First, I assume by "working day" you are referring to Weekdays only and want to exclude Saturday and Sunday.

On this basis, I used my Dim_Date (ie Calendar) table and came up with the following:

WorkingDayofMonth = 
    RANKX(
        FILTER(
                DIM_Date,
                DIM_Date[MMYYYY]=EARLIER(DIM_Date[MMYYYY]) &&
                DIM_Date[IsWeekday] = TRUE()
                ),
        DIM_Date[DayOfMonth],,ASC,Skip
        )
Date DayName IsWeekday DayOfMonth WorkingDayofMonth
1-Sep-19 Sunday False 1 1
2-Sep-19 Monday True 2 1
3-Sep-19 Tuesday True 3 2
4-Sep-19 Wednesday True 4 3
5-Sep-19 Thursday True 5 4
6-Sep-19 Friday True 6 5
7-Sep-19 Saturday False 7 6
8-Sep-19 Sunday False 8 6
9-Sep-19 Monday True 9 6
10-Sep-19 Tuesday True 10 7
11-Sep-19 Wednesday True 11 8
12-Sep-19 Thursday True 12 9
13-Sep-19 Friday True 13 10
14-Sep-19 Saturday False 14 11
15-Sep-19 Sunday False 15 11
16-Sep-19 Monday True 16 11
17-Sep-19 Tuesday True 17 12
18-Sep-19 Wednesday True 18 13
19-Sep-19 Thursday True 19 14
20-Sep-19 Friday True 20 15
21-Sep-19 Saturday False 21 16
22-Sep-19 Sunday False 22 16
23-Sep-19 Monday True 23 16
24-Sep-19 Tuesday True 24 17
25-Sep-19 Wednesday True 25 18
26-Sep-19 Thursday True 26 19
27-Sep-19 Friday True 27 20
28-Sep-19 Saturday False 28 21
29-Sep-19 Sunday False 29 21
30-Sep-19 Monday True 30 21

So, 9/16/2019 is the 11th Working Day of that Month Year.

Hope this is a solution that can work for you.

Regards,

View solution in original post

1 REPLY 1
rsbin
Community Champion
Community Champion

@Aarti1 ,

First, I assume by "working day" you are referring to Weekdays only and want to exclude Saturday and Sunday.

On this basis, I used my Dim_Date (ie Calendar) table and came up with the following:

WorkingDayofMonth = 
    RANKX(
        FILTER(
                DIM_Date,
                DIM_Date[MMYYYY]=EARLIER(DIM_Date[MMYYYY]) &&
                DIM_Date[IsWeekday] = TRUE()
                ),
        DIM_Date[DayOfMonth],,ASC,Skip
        )
Date DayName IsWeekday DayOfMonth WorkingDayofMonth
1-Sep-19 Sunday False 1 1
2-Sep-19 Monday True 2 1
3-Sep-19 Tuesday True 3 2
4-Sep-19 Wednesday True 4 3
5-Sep-19 Thursday True 5 4
6-Sep-19 Friday True 6 5
7-Sep-19 Saturday False 7 6
8-Sep-19 Sunday False 8 6
9-Sep-19 Monday True 9 6
10-Sep-19 Tuesday True 10 7
11-Sep-19 Wednesday True 11 8
12-Sep-19 Thursday True 12 9
13-Sep-19 Friday True 13 10
14-Sep-19 Saturday False 14 11
15-Sep-19 Sunday False 15 11
16-Sep-19 Monday True 16 11
17-Sep-19 Tuesday True 17 12
18-Sep-19 Wednesday True 18 13
19-Sep-19 Thursday True 19 14
20-Sep-19 Friday True 20 15
21-Sep-19 Saturday False 21 16
22-Sep-19 Sunday False 22 16
23-Sep-19 Monday True 23 16
24-Sep-19 Tuesday True 24 17
25-Sep-19 Wednesday True 25 18
26-Sep-19 Thursday True 26 19
27-Sep-19 Friday True 27 20
28-Sep-19 Saturday False 28 21
29-Sep-19 Sunday False 29 21
30-Sep-19 Monday True 30 21

So, 9/16/2019 is the 11th Working Day of that Month Year.

Hope this is a solution that can work for you.

Regards,

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.