The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now
Dear all,
i would like to count the nth weekday number by month in a calc column, how can this be done?
like this:
Date | Month | YEAR | DOW | Nth dow |
1-1-2018 00:00 | 1 | 2018 | 1 | 1 |
2-1-2018 00:00 | 1 | 2018 | 2 | 1 |
3-1-2018 00:00 | 1 | 2018 | 3 | 1 |
4-1-2018 00:00 | 1 | 2018 | 4 | 1 |
5-1-2018 00:00 | 1 | 2018 | 5 | 1 |
6-1-2018 00:00 | 1 | 2018 | 6 | 1 |
7-1-2018 00:00 | 1 | 2018 | 7 | 1 |
8-1-2018 00:00 | 1 | 2018 | 1 | 2 |
9-1-2018 00:00 | 1 | 2018 | 2 | 2 |
10-1-2018 00:00 | 1 | 2018 | 3 | 2 |
11-1-2018 00:00 | 1 | 2018 | 4 | 2 |
12-1-2018 00:00 | 1 | 2018 | 5 | 2 |
13-1-2018 00:00 | 1 | 2018 | 6 | 2 |
14-1-2018 00:00 | 1 | 2018 | 7 | 2 |
15-1-2018 00:00 | 1 | 2018 | 1 | 3 |
16-1-2018 00:00 | 1 | 2018 | 2 | 3 |
17-1-2018 00:00 | 1 | 2018 | 3 | 3 |
18-1-2018 00:00 | 1 | 2018 | 4 | 3 |
19-1-2018 00:00 | 1 | 2018 | 5 | 3 |
20-1-2018 00:00 | 1 | 2018 | 6 | 3 |
21-1-2018 00:00 | 1 | 2018 | 7 | 3 |
22-1-2018 00:00 | 1 | 2018 | 1 | 4 |
23-1-2018 00:00 | 1 | 2018 | 2 | 4 |
24-1-2018 00:00 | 1 | 2018 | 3 | 4 |
25-1-2018 00:00 | 1 | 2018 | 4 | 4 |
26-1-2018 00:00 | 1 | 2018 | 5 | 4 |
27-1-2018 00:00 | 1 | 2018 | 6 | 4 |
28-1-2018 00:00 | 1 | 2018 | 7 | 4 |
29-1-2018 00:00 | 1 | 2018 | 1 | 5 |
30-1-2018 00:00 | 1 | 2018 | 2 | 5 |
31-1-2018 00:00 | 1 | 2018 | 3 | 5 |
1-2-2018 00:00 | 2 | 2018 | 4 | 1 |
2-2-2018 00:00 | 2 | 2018 | 5 | 1 |
3-2-2018 00:00 | 2 | 2018 | 6 | 1 |
4-2-2018 00:00 | 2 | 2018 | 7 | 1 |
5-2-2018 00:00 | 2 | 2018 | 1 | 1 |
6-2-2018 00:00 | 2 | 2018 | 2 | 1 |
7-2-2018 00:00 | 2 | 2018 | 3 | 1 |
8-2-2018 00:00 | 2 | 2018 | 4 | 2 |
9-2-2018 00:00 | 2 | 2018 | 5 | 2 |
Solved! Go to Solution.
Hi @Anonymous
Please use this formula:
Column = ROUNDUP(DAY('Table'[Date])/7,0)
Hi @Anonymous
Please use this formula:
Column = ROUNDUP(DAY('Table'[Date])/7,0)
It can be calculated with this DAX
Nth dow = 1 + INT ( ( DAY ( 'Table'[Date] ) - 1 ) / 7 )
Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.
User | Count |
---|---|
158 | |
109 | |
96 | |
83 | |
75 |
User | Count |
---|---|
154 | |
137 | |
131 | |
81 | |
62 |