Forum Discussion
Show data by week number
- 10 years ago
The calendar is separate and more useful that way. In fact, having your week numbers in your fact table may be throwing off the calculation and sort. While I don't have time to fully explain this, at this time, I wanted to at least respond and share a link that could help.
https://www.sqlbi.com/articles/week-based-time-intelligence-in-dax/
Not quite clear on the issue but you can create a week number from a date field using a calculated column such as:
WeekNum = WEEKNUM([Date])
Then you can create a column like:
Week = "Week " & [WeekNum]
Set your sort by for this column to the "WeekNum" column and then use the "Week" column in you Axis.
Hello,
Hope you can help me.
What if I need to sort weeks from different years ?
Example _
2016 (WK) 51- 2016 (WK) 52 - 2017 (WK) 1 - 2017 ( WK) 2 ) ...Sort problems started when I upload data for 2017 (WK )10
Now sort is showing as below :
201651 -201652 - 201701-201710-20172-20173-20174 ....
Hope you can help me to resolve it ..I tried everything..!!
- cmonnette9 years agoNew Member
Have you been able to resolve this? I am having the same issue sorting weeknumbers across multiple years.
- cmonnette9 years agoNew Member
Have you been able to resolve this? I am having the same issue sorting weeknumbers across multiple years.
- cmonnette9 years agoNew Member
I was able to resolve this by adding the following column to my data table and then sorting in default order.
"WorkWeek", YEAR([date]) & format(WEEKNUM ( [Date] ),"00")
- Anonymous8 years agoNot applicablecan you explain a bit more how you did it?