Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have a date table and am trying to get the week number to output two digits every time. I currently have the formula below, but the output will just have one digit if the week number is a single digit i.e. it will show 1 instead of 01. This gets the sorting out of order. I want the output to get two digits everytime.
Date =
ADDCOLUMNS (
CALENDAR (date(2017, 1,1), date(2018,12,31)),
"Year", YEAR ( [date] ),
"QuarterOfYear", FORMAT ( [Date], "Q" ),
"MonthOfYear", FORMAT ( [Date], "MM" ),
"DateInt", FORMAT ( [Date], "YYYYMMDD" ),
"MonthName", FORMAT ( [Date], "mmmm" ),
"MonthYear", FORMAT ( [Date], "mmm YY"),
"QuarterInCalendar", "Q" & FORMAT ( [Date], "Q" ) & " " & FORMAT ( [Date], "YYYY" ),
"WeekNum", FORMAT( [date], "ww/YYYY" ),
"YearWeekNum", Format ( [date], "YYYY/ww"),
"DayInWeek", WEEKDAY ( [Date] ),
"DayOfWeekName", FORMAT ( [Date], "dddd" ),
"DayOfWeekShort", FORMAT ( [Date], "ddd" ),
"YearMonthShort", FORMAT ( [Date], "YYYY mm" ),
"MonthNameShort", FORMAT ( [Date], "mmm" ))
Solved! Go to Solution.
Hi @joshcomputer1,
Try this ?
"WeekNum",FORMAT(WEEKNUM([date],2),"00")& "/" & FORMAT ( [Date], "YYYY" ),
Regards,
Cristina
Hi @joshcomputer1,
Try this ?
"WeekNum",FORMAT(WEEKNUM([date],2),"00")& "/" & FORMAT ( [Date], "YYYY" ),
Regards,
Cristina
User | Count |
---|---|
84 | |
79 | |
69 | |
46 | |
43 |
User | Count |
---|---|
106 | |
50 | |
49 | |
40 | |
39 |