Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear Community,
Taking Nov 2020 as example, would like to get help on weeknum (1-4) monthly and based on Monday as a new week.
1 Nov (Sunday) - week 1
2 Nov (Mon) - 8 Nov (Sun) - week 2
9 Nov (Mon) - 15 Nov (Sun) - week 3
16 Nov (Mon) - 22 Nov (Sun) - week 4
23 Nov (Mon) - 29 Nov (Sun) - week 5
30 Nov (Mon) - week 6
Had go thru some previous post and get this DAX,
Solved! Go to Solution.
@NickProp28 , Create following in your date table
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
min week start of month = minx(filter('Date',[Month Year] =earlier([Month Year])),[Week Start date])
week of month = datediff([min week start of month],[date],Week)
or
week of month = quotient(datediff([min week start of month],[date],day),7)+1
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
@NickProp28 , Create following in your date table
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
min week start of month = minx(filter('Date',[Month Year] =earlier([Month Year])),[Week Start date])
week of month = datediff([min week start of month],[date],Week)
or
week of month = quotient(datediff([min week start of month],[date],day),7)+1
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |