Need Line Graph show months even if no data for a specific month
Hi Having gaps of months missing presents problems for line charts and you will probably need to rectify it. You will have to ensure that there are no gaps in the data you are sending to the chart - use T-SQL to infer values for the missing months, or look to rectify in the source data. A good way of doing this is to do a left join from a date table containing no gaps in the months/dates you want to display to your data. If there is no value in your data you will get a NULL, and you can do an ISNULL(whateverfield, 0), to infer a 0 value for that time period.
February 7th, 2011 8:50pm

So I have a line graph that has months as category and sums total cost. For some individuals there are gaps of months missing if there is not data for that month. I want to show every month and if there is not data for a month show it as zero, but at least show the month. This sounds easy but I can't get it to work correctly Thanks kam
Free Windows Admin Tool Kit Click here and download it now
February 7th, 2011 9:23pm

Hi Having gaps of months missing presents problems for line charts and you will probably need to rectify it. If there is a missing month, can the value for that month be inferred from the previous month? You will have to ensure that there are no gaps in the data you are sending to the chart - use T-SQL to infer values for the missing months, or look to rectify in the source data.
February 7th, 2011 10:53pm

Hi, You can achive this by setting the 'scalar axis' property in axis properties. Right click the axis that displays your months, select properties, then in the dialog box set the tick for 'scalar axis'. Chart should now display all months between your lowest to highest including the gaps. Please try and let us know if this helps resolve the issue.Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful. BH
Free Windows Admin Tool Kit Click here and download it now
February 8th, 2011 2:20am

Hi, Glad to note that you got it to work. Thanks for the comments about the fix you applied with min and max together with interval. Regards Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful. BH
February 12th, 2011 3:34am

Josh thanks for replying but this is not an options- for some people who I am creating the graph about they simple do not have any input for the month-
Free Windows Admin Tool Kit Click here and download it now
February 12th, 2011 4:15am

Got it to work the datepart function I used created the months by stating them as varchar ( ex: 1 for january, 2 for February, etc). I changed the horizontal properties to scaler and also changed Min to 1 Max to 12 interval to 1 and type to number and it works fine. Thanks BH kam
February 12th, 2011 4:41am

This is getting me closer- so for the month there is a field called "SaleMonth"- I wrote som t-sql in the stored proc that runs every night and populates a field called "saleMonth" - it just uses the DatePart function to do this and grabs the month from the entire dat field. Is there a way to simple hard code the month along the horizontal axis and not have to worry about "missing" months? The process you mention Bilal is getting me almost there its just that the month along the axis is coming across as " 1/1/800" or something similar?? I'll play around with it but we are close
Free Windows Admin Tool Kit Click here and download it now
February 12th, 2011 4:52am

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

Other recent topics Other recent topics