Forum Discussion
sudeng123
Microsoft Employee
5 years agomanipulation of the dax function Weeknum
so i manually made the column year and week by using year and weeknum dax, but a problem came up where when i sort this column asc, it thinks FY2012-W10 is before FY2012-W6 because 1 comes before 6, is there a way for me to manipulate the weeknum dax to do 01 instead of just 1? also i cannot use power query right now and i cannot sort this column by another column because every other column has duplicate data in it, when i tried that it just throws me an error.
any help would be appreciated.
You can use a custom format string, or make a column with an expression like this.
FYWW = "FY" & FORMAT('Date'[Date], "yyyy") & "WK" & FORMAT(WEEKNUM('Date'[Date],1), "00")Regards,Pat
2 Replies
- mahoneypat
Microsoft Employee
You can use a custom format string, or make a column with an expression like this.
FYWW = "FY" & FORMAT('Date'[Date], "yyyy") & "WK" & FORMAT(WEEKNUM('Date'[Date],1), "00")Regards,Pat- sudeng123
Microsoft Employee
very slick solutions, thank you sir