none
Customize(Formating) Y-axis Label in SSRS Chart

    Question

  • My chart has negative and postive value for Y-axis label. I have set cross-at property to 0. I would like to hide the negative value Y-axis label. I tried to customize the label but it's not working. Is there a way to write expression to hide some y-axis labels?


    Monday, July 15, 2013 5:43 PM

Answers

  • You can use the LabelsFormat property of the Y-axis.  Try this format: 0;'';0

    As you can see this consists of three parts: positive value format;negative value format;zero format

    So specifying that will hide the negative value labels.

    For more formatting tricks see Formatting Numbers [SSRS]


    MCITP SQL Server 2008 (BI & DEV); MCTS SQL Server 2008 (BI, DEV & DBA)
    Check out my articles at BI: Beer Intelligence?

    • Marked as answer by DevenIT Tuesday, July 16, 2013 2:55 PM
    Tuesday, July 16, 2013 7:48 AM

All replies

  • If you do not wish to show negative values, can you suppress them in the dataset?  i.e. make them 0 or null?

    Mark

    Monday, July 15, 2013 6:33 PM
  • I have negative value data for series. Means, i am using neative value chart area.

    I do not want to display the negative labels on Y-axis as per the user requirement.

    Monday, July 15, 2013 6:38 PM
  • Understood, I am suggesting that you modify the SQL with a CASE Statement to remove the negatives.
    Monday, July 15, 2013 6:42 PM
  • I can't remove negative data. User want to see chart with all data but they do not want to see Y-axis negative labels. Means, I have to use postive and negative chart area but my Y-axis should only display the postive lables. Labels above the X-axis only.


    Monday, July 15, 2013 7:20 PM
  • Go to vertical axis properties > Axis Options and set minimum to 0 instead of Auto.

    Mark

    Monday, July 15, 2013 7:40 PM
  • Can you provide us some screenshot ahout expect output and the dataset with the sample data? So that you can get more help.
    Tuesday, July 16, 2013 7:04 AM
  • You can use the LabelsFormat property of the Y-axis.  Try this format: 0;'';0

    As you can see this consists of three parts: positive value format;negative value format;zero format

    So specifying that will hide the negative value labels.

    For more formatting tricks see Formatting Numbers [SSRS]


    MCITP SQL Server 2008 (BI & DEV); MCTS SQL Server 2008 (BI, DEV & DBA)
    Check out my articles at BI: Beer Intelligence?

    • Marked as answer by DevenIT Tuesday, July 16, 2013 2:55 PM
    Tuesday, July 16, 2013 7:48 AM
  • Using  format0;'';0, it work for numbers. When i try to use this fomat as 0.0%;'';0.0% for Percentage Axis Label, it display as 0.0% for 0 to -0.4 interval.

    I am using Percentage in other chart as Y-axis Label. Min Range= -1, Max Range= 1, Interval = 0.1

    Please let me know if i am missing anything.

    Tuesday, July 16, 2013 3:30 PM
  • You're not missing anything, as far as I can tell that should work the same with percentages...

    MCITP SQL Server 2008 (BI & DEV); MCTS SQL Server 2008 (BI, DEV & DBA)
    Check out my articles at BI: Beer Intelligence?

    Wednesday, July 17, 2013 7:46 AM
  • To display 10.0% with interval to 10, I have to set the value as 0.1,0.2,0.3,,,,,,1.0.

    As per format0;'';0 , Last formatt position is for 0. It consider -0.1,-0.2,-0.3,-0.4 as 0 and 0.5 and onwards it consider 1 (Becuase it assumes Round(0.1)=0 , Round(0.5)=1).

    Please suggest your thoughts.


    Wednesday, July 17, 2013 3:29 PM