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/
Add a calculated column
Week = WEEKNUM([Date])
Create a measure and add it to the Tooltips field.
WeekNum = AVERAGE(Table[Week])
Then you will see the week number when hovering on the visual.
Hi Eric_Zhang
Thank you, it works!
And i've found a new problem, it's about a mistake of the week number.
Like in the chart below, when i see with all the date, the week of 28 dec 2015 should be the week 53, but here it show 44, and there is no first week of 2016, it start from the second week, normaily the week of 4 jan 2016 should be the the first week of 2016.
And when i show the data by years, it seperate the week 53 of 2015 in week 53 of 2015 and week 1 of 2016, which they should be the week 53 of 2015
Do you know maybe how can i correct this?