Replacing x-axis lables from numeric to text

  • Hi All

    I'm currently working on a line graph that displays the the amount of money received against each month.

    So my y-axis holds the money value and the x-axis holds the months.

    in my database i'm storing the months as follows:

    1 - For april

    2 - For May

    ....

    12 - For march

    So when i select data from the table and generate the graph, my x-axis is displaying 1, 2, ...12

    is there a way the change the numbers to proper month, i.e. i want it to display April, May ... March.

    I have been looking online and there seems to be a way i just cant get it to work correctly. The solution seems to be :

    1. Right click on x-axis and select Axis Properties

    2. In the Axis Options and in the minimum textbox place 1 and in the maximum enter 12

    3. Slect the Number tab and select Custom and in the experssion window enter the following ="April;May;June;July;August;September;October;November;December;January;Feberuary;March"

    This does print April, but for all of the months..

    can anyone help

    thank you in advance

  • why would you want to associate 1 with April and not January? :unsure:²

    anyway, it's an evil solution :sick:, if you really want to hard code, do it in SQL.

    but let's fix it, forget everything and go back to your chart with 1, 2, 3 ..., 12

    Go to your Group properties and not to the Axis properties. I suppose it's your Category grouping since time should be on the x-axis. Find Label input field and edit the expression to

    =Monthname((Fields!Order.Value+3) Mod 12))

    and there it is!

    If the labels are too long, try

    =Monthname((Fields!Order.Value+3) Mod 12), true) to abbreviate.

  • Its only to do with financial year. it starts on 01.04.2010 and ends 30.03.2011

  • did that work?

  • Hi

    Sorry i only seen ur suggested solution today. I have tried and it seems to select June for all of the month.

  • I have it working with my reports. Did you create a new chart?

  • Hi

    i'm not sure what u mean about group property,

    I have done the following

    1. on the graph/x-axis i right clicked

    2. selected category axis property

    i get the lable tab, however there is no option to allow me to write an expression. i onlt get the following:

    1. Hide axis lables

    2. enable auto fit

    3. disable auto fit..

    how can i get to the group property?

    thanks

  • I've stated not the Axis properties... Keep your axis as is.

    I'm borrowing this image from MS. You should right click 'FullName' and choose Group Properties. And go from there to find the Label field.

  • Finally got it to work, thanks for all ur help

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply