Bar Chart Hozizontal not showing all categories if value is null

Hi

I have a bar chart and a matrix table that I wish to show together under a row group.

I have managed to acheive this by creating a matrix and then dropping the field I want to group on in the Row part. I then add a rectangle and drag this to the data value of the newly created matrix. I then copy the bar chart and the first matrix table to the rectangle in the data value of the created matrix.

I run this and it works really well apart from if there is no data available for a horizontal category it does not show.

I have tried setting the axis interval to 1 but it does not work.

However if you run the bar chart and matrix table seperatlely all Horizontal categories show.

Any ideas on how I can get around this?

Regards

December 30th, 2013 6:00pm

Hi aivoryuk,

If I understand correctly, the issue which you occurred is that the bar chart didnt show all horizontal values when the category value is null. After testing the issue in my environment, I can reproduce it. Based on my research, we can refer to the steps below to achieve your requirement:

  1. Right-click the horizontal axis to open the Horizontal Axis Properties dialog box.
  2. Type the minimum value in the Minimum textbox and maximum value in the Maximum textbox based on your dataset values.
  3. Set the axis Interval to 1 or other appropriate values.


If there are any misunderstanding, please elaborate the issue for further investigation.

Thanks,
Katherine Xiong

Free Windows Admin Tool Kit Click here and download it now
December 31st, 2013 2:27pm

Hi aivoryuk,

If I understand correctly, the issue which you occurred is that the bar chart didnt show all horizontal values when the category value is null. After testing the issue in my environment, I can reproduce it. Based on my research, we can refer to the steps below to achieve your requirement:

  1. Right-click the horizontal axis to open the Horizontal Axis Properties dialog box.
  2. Type the minimum value in the Minimum textbox and maximum value in the Maximum textbox based on your dataset values.
  3. Set the axis Interval to 1 or other appropriate values.


If there are any misunderstanding, please elaborate the issue for further investigation.

Thanks,
Katherine Xiong

January 3rd, 2014 4:57pm

Hi aivoryuk,

Sorry for the delay in getting back to you.

In my former reply, the minimum value means the minimum value in the field which is added on the horizontal axis. But based on your latest reply, I want to change my recommendation. To fix this issue, you can refer to the steps below:

  1. Add a calculated field named Month with the following expression inyour dataset:
    =switch(trim(Fields!Dates.Value)="JAN",1, trim(Fields!Dates.Value)="FEB",2, trim(Fields!Dates.Value)="MAR",3, trim(Fields!Dates.Value)="APRIL",4, trim(Fields!Dates.Value)="MAY",5, trim(Fields!Dates.Value)="JUN",6, trim(Fields!Dates.Value)="JUL",7, trim(Fields!Dates.Value)="AUG",8, trim(Fields!Dates.Value)="SEP",9, trim(Fields!Dates.Value)="OCT",10, trim(Fields!Dates.Value)="NOV",11, trim(Fields!Dates.Value)="DEC",12)
  2. Use the Month field to replace the Dates field on the horizontal axis.
  3. Type 1 in the Minimum textbox and 2 in the Maximum textbox.
  4. Set the axis Interval to 1.


If you have any other questions, please feel free to ask.

Thanks,
Katherine Xiong

Free Windows Admin Tool Kit Click here and download it now
January 7th, 2014 4:12pm

Hi Katherine

That worked for me which is great. I do have a couple of further questions.

  1. How can I now get the Horizontal Axis label to show the String of the field rather than the Number so "JAN" instead of 1
  2. In my actual report I also have a year category, before making your suggested change it would show the year on the axis ("2013") but now nothing shows
  3. As mentioned in the 1st post as well as a bar chart, there is also a a matrix table that also lives in the rectangle, I applied your suggested changes but the matrix still only shows months where there is data

So if using the previous table example I had a further column called group2 which looks like this

Dates   Group1                 Value			Group2
JAN             River              45			Red
FEB             River              78			Blue
MAR             River              65			Red
APRIL           River              14			Green
MAY             River              569			Green
JUN             River              12			Blue
JUL             River              456			Red
AUG             River              78			Green
SEP             River              45			Green
OCT             River              31			Red
NOV             River              45			Blue
DEC             River              78			Blue
MAR             Tree               75			Green
MAY             Tree               67			Red
JUN             Tree               45			Red
NOV             Tree               15			Red
APRIL           Rock               44			Blue
MAY             Rock               67			Blue
JUL             Rock               12			Green
OCT             Rock               66			Green

Group1 is still my main row grouping function of my main table matrix. The 2nd matrix that sits inside the rectangle of the main table matrix has group2 as its row group the newly created month as the column group and the sum of value in the data part of the 2nd matrix.

How would you get all the months to show in the 2nd matrix

Hope this makes sense and thanks for the help so far.

Regards

January 8th, 2014 4:41pm

Hi Katherine

Have you managed to get any further with this?

Best Regards

Alex

Free Windows Admin Tool Kit Click here and download it now
January 13th, 2014 4:19am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics