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 want to create a continous column of week numbers. By this, I mean say that last week in 2012 was 53, then in jan 2013, the weeknumber should be 54 and so on
Regards
Solved! Go to Solution.
In Query Editor, try this. Add a custom column, and paste in this formula:
([Year] - List.Min(<Enter Previous Step Name Here>[Year])) * 53 + [Week Number]
This assumes 4 things.
1) You have a column called [Year] (modify the name in the formula needed)
2) You also have a column called [Week Number] (again, modify as needed)
3) There are always 53 weeks per year
4) [Week Number] is a column that always repeats from 1 to 53
The new column will not "reset" at 53, but will continue to increase.
Note, when you add the previous step name, it will need to follow this syntax:
if the previous step name is
Changed Type
then write this:
#"Changed Type"
Basically, wrap it in quotes and throw a # in front of it.
In Query Editor, try this. Add a custom column, and paste in this formula:
([Year] - List.Min(<Enter Previous Step Name Here>[Year])) * 53 + [Week Number]
This assumes 4 things.
1) You have a column called [Year] (modify the name in the formula needed)
2) You also have a column called [Week Number] (again, modify as needed)
3) There are always 53 weeks per year
4) [Week Number] is a column that always repeats from 1 to 53
The new column will not "reset" at 53, but will continue to increase.
Any idea to to get a contious week number taking the fact into account that there are years with 52 weeks?
I am not able to understand what is "Enter Previous Step Name Here"
Note, when you add the previous step name, it will need to follow this syntax:
if the previous step name is
Changed Type
then write this:
#"Changed Type"
Basically, wrap it in quotes and throw a # in front of it.
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 |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |