Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys.
I'm trying to make a line chart showing a development in the number of customers in my company. On the x axis I want to show the week number, but I have several years of data. I managed to make a column showing the week numbers like this: 201738, but I don't think this looks very good in my chart. Is it possible to show just the week numbers but still sort after years?
Hope some of you can help,
Thanks!
Solved! Go to Solution.
I tried a range of different stuff, and this is how I best solved my problem:
First of all I made a calendar table
Date = CALENDAR (DATE(2015;1;1); DATE(YEAR(LASTDATE(...));Month(LASTDATE(....));DAY(LASTDATE(...))))
I then made a hierachy with week and year. Drilled down my chart to the lowest level. Went to formatting pane to switch off the concatenation and then I had my weeks in the right order with the year showing below.
To show latest 10 weeks I used the date table to make a relative slicer.
I tried a range of different stuff, and this is how I best solved my problem:
First of all I made a calendar table
Date = CALENDAR (DATE(2015;1;1); DATE(YEAR(LASTDATE(...));Month(LASTDATE(....));DAY(LASTDATE(...))))
I then made a hierachy with week and year. Drilled down my chart to the lowest level. Went to formatting pane to switch off the concatenation and then I had my weeks in the right order with the year showing below.
To show latest 10 weeks I used the date table to make a relative slicer.
Hi Krstina!!
m with the same problem!! 😞
please could you share your solution in power bi to check it? I dont understand very well your solution.
thanks a lot!!!!!!!!!!!
Great Solution.
Congratulations !!!!
Vicente
Hi @_Kristina_
You can try @SivaMani approach. The solution is correct.
But you can add the Year in the visual under the WeekNum so there will be only a WeekNum per year
Hope Tant Helps
Vicente
Create a calculated column like below,
WeekNo = WEEKNUM(Table[Date],1)
1 -> week begins on Sunday
2 -> week begins on Monday
@SivaMani Thanks, but I already tried this. The problem is that in my chart, all of the week 1 will be in one point on the axis, all of the week 2s will be in another point and so on. I need to sort after both year and week. Don't know if it makes any sense.
Thanks 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |