February 27, 2015 at 5:23 am
Hello
I am trying to add a weekday name to the horizontal axis in a chart (SSRS).
In horizontal Axis Properties I went to number, then Custom, and added:
=(WeekdayName(Fields!Date.Value))
It nearly works. I have put in this week's dates into the parameters (23/02/2015 - 28/02/2015) but the x-axis is showing the dates as numbers, eg 23 - 24 - 25. I'd love to see the words Monday, Tuesday et al in there instead.
When setting up the chart I have Fields!Date.Value as the category group, at the moment grouped on =day(Fields!Date.Value)
Any suggestions on how to get 'Monday', 'Tuesday' etc to appear would be much appreciated.
Thanks.
February 27, 2015 at 6:10 am
Try this instead
=String.Format("{0:dddd}",Fields!Date.Value)
Far away is close at hand in the images of elsewhere.
Anon.
February 27, 2015 at 7:37 am
Many thanks for getting back.
This has nearly worked but across the x-axis it is displaying the first day only, five times, eg for the dates 23/2/15 - 28/2/15 it has 'Monday', 'Monday' 'Monday' etc, rather than Monday, Tuesday, Wednesday.
Any ideas? Thanks.
March 2, 2015 at 1:37 am
I solved the above by setting 'label' and 'group on' as:
=weekdayname(weekday(Fields!date.Value))
March 2, 2015 at 2:13 am
Glad you found a solution however if you are grouping by day name make sure your date range does not span more than a week otherwise data will be aggregated (unless this is what is required)
Far away is close at hand in the images of elsewhere.
Anon.
March 2, 2015 at 2:18 am
Thanks. Basically the report serves as a snapshot of the previous week so is sound for that purpose.
However, when you say ' otherwise data will be aggregated ' - I'm not sure what you mean, unfortunately. Do you mean that if I extend the parameters for more than one week, when the report is saying 'Monday's' value won't in fact be the case?
Any insight appreciated, if you have the time - thanks.
March 2, 2015 at 2:44 am
faulknerwilliam2 (3/2/2015)
Thanks. Basically the report serves as a snapshot of the previous week so is sound for that purpose.However, when you say ' otherwise data will be aggregated ' - I'm not sure what you mean, unfortunately. Do you mean that if I extend the parameters for more than one week, when the report is saying 'Monday's' value won't in fact be the case?
Any insight appreciated, if you have the time - thanks.
Depending on what the grouping is applied to but yes it is conceivable that if you extend the date range then all values for each Monday will be aggregated to a single Monday value or worse any one (or first) of the Monday values could be used.
Far away is close at hand in the images of elsewhere.
Anon.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply