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.
Hello, I've created a date table in an attempt to create a Year/Month/Week/Date Hierarchy. The problem I have is with the weeks, of course...
In every other Q&A that I've studied on the forum, the solution works on the framework of days-of-the-week, i.e. Sunday through Saturday, or Monday through Sunday.
But I need a week number column based on the day of the month (i.e. take whichever number it is, 1-31, divided by 7 days in a week, to give a result somewhere between 1-5). For example, days 1-7 would always give a result = 1, days 8-14 would always give result = 2, etc.
Here's what I mean, the two real columns are the ones I've managed to create, and the far-right column with red text ("WeekNum") is what I actually want a DAX formula to do:
Thanks in advance!
Solved! Go to Solution.
PS, don't try and create a YEAR/MONTH/WEEK hierarchy. They just don't work well together.
Create a YEAR/MONTH, or a YEAR/WEEK - but in the later case make sure the YEAR aligns with your first/last weeks
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |