Forum Discussion
Anika3186
5 years agoFrequent Visitor
change number format in query editor
Hello, I have a column ("calendar week) with numbers from 1-53 (the column is formatted as Integer). Now I want to put a 0 in front of the numbers 1-9 (=> 01,02,03, etc). Can someone help me and...
- 5 years ago
Please try this approach in a DAX column, using your table/column names.
NewWeekNum = FORMAT(WEEKNUM('Date'[Date]), "00")Or you can do it in the query editor with this formula in a custom column= Text.PadStart(Text.From(Date.WeekOfYear([DateColumn])), 2, "0")Regards,Pat
MarkSmit
4 years agoNew Member
Hi Anika,
What i do is:
1. select column Calander week
2. transform column and add prefix "0"
3. transfrom same column and extract last 2 digits
If you want to keep your original column then use add column.
greatings