-
2. Re: How do I plot data by weeks, but show axis in Months (discrete)?
Stephen Lavery May 24, 2016 3:35 AM (in response to Ramesh Krishnan)2 of 2 people found this helpfulHi Ramesh,
Like John above I've gone for the dual axis method. I've had to make the trend lines by month transparent so you cant see them. Only issue with this method is that I have lots of 'extra' axis beacuse of the month value. This could be worked around by fixing the axis to a certain limit:
See the attached workbook.
Kind Regards,
Stephen
-
4. Re: How do I plot data by weeks, but show axis in Months (discrete)?
Ashish Chaudhari May 24, 2016 4:01 AM (in response to Pranay Sahu)Hi Pranay,
I guess your data is at month level. I think trend needs to be by weeks and axis should display as months.
-Ashish
-
5. Re: How do I plot data by weeks, but show axis in Months (discrete)?
Ramesh Krishnan May 24, 2016 5:57 AM (in response to John Sobczak)Hi John,
Thanks for the super-quick reply. You have taken the date as actual dates (what I mean by this is, your dates are like Jan 2011, Feb 2011, etc. and they move on to Jan 2012, Feb 2012, etc on the x-axis itself).
I wanted it to be Jan to Dec in the x-axis and the different years should be shown in different colors (the x-axis should not have any year information).
Stephen's answer is exactly what I was looking for.
Thanks again!
Ramesh
-
6. Re: How do I plot data by weeks, but show axis in Months (discrete)?
Ramesh Krishnan May 24, 2016 6:18 AM (in response to Stephen Lavery)Hello Stephen,
This is exactly what I wanted to do. Thanks for helping the community here. I will mark this post as the correct answer (hope you do not mind) because I am listing down the steps for others to quickly execute.
I am listing down the steps right here.
1. Bring the month pill on to the column shelf, then expand it to week number (keep the data parts alone, I mean Month should be May, not May 2015, and week number should also be like that). By default, both will be marked as discrete (blue pills).
2. Bring your measure on to the row shelf.
3. Change both month and week to continuous (now the pills will turn green). Make sure Month pill stays on the left side of week pill.
4. Mark week as "dual axis".
5. On the marks card, choose the card for month and click on color and change transparency to 0%.
6. Click on week number pill and uncheck show header.
7. Because you marked the month pill as continuous, the axis will be like Dec, Jan, Feb, ... , Nov, Dec, Jan. But we really don't want the additional Dec and Jan. So, just right click the axis and "Edit axis" and choose fixed range and make it 0 to 12. Now your axis will have labels from Jan to Dec only.
There you go
Thanks, Stephen, for providing the correct answer!
Regards,
Ramesh
-
7. Re: How do I plot data by weeks, but show axis in Months (discrete)?
Stephen Lavery May 24, 2016 6:33 AM (in response to Ramesh Krishnan)No problem! Glad I could help
-
8. Re: How do I plot data by weeks, but show axis in Months (discrete)?
Ramesh Krishnan May 30, 2016 1:17 AM (in response to Ramesh Krishnan)Guys, a follow up question. I just noticed that this method removes the colors from the legends! Is there anyway to retain the color legends? Because, otherwise, the whole exercise is useless!
The legend vanishes the moment I change the transparency of Months to 0.
Notice that the years 2012, 2013, 2014 do not have color legends!!
Thanks,
Ramesh
-
9. Re: How do I plot data by weeks, but show axis in Months (discrete)?
Ramesh Krishnan May 30, 2016 1:17 AM (in response to Stephen Lavery)Hi Stephen, could you please take a look at my follow-up question?
-
10. Re: How do I plot data by weeks, but show axis in Months (discrete)?
Stephen Lavery May 30, 2016 6:19 AM (in response to Ramesh Krishnan)1 of 1 people found this helpfulHi Ramesh,
That's a fair point. What you can do then is create a copy of the dimension you want in colour and drop this into the Week axis. This version will not be transparent and then you can hide the old one:
Best,
Stephen
Edit:
Actually you can just remove Year from the MONTH(Order Date) line all together and then just have it in WEEK(Order Date). This is simpler than my above response:
-
11. Re: How do I plot data by weeks, but show axis in Months (discrete)?
Ramesh Krishnan May 30, 2016 9:29 AM (in response to Stephen Lavery)Thanks, Stephen!