SSRS:How to Add a Trend Line Series to Chart which has only 1 Point on X Axis - ssrs-2008

The reason I need this is,my chart is inside a Tablix and Only 1 Value(X-axis point) gets supplied to each Row
I can see this line which is centered to chart(as per X-axis) .I want it to run from (X,Y)(0,0) till end of Chart

Pavan,
The trend line is the result of a linear regression and, as such, will need more than one observation in order to be calculated.
For a cloud of data to define the line that represents its trend (a trend line must be unique, that is why I refer to it as "the" trend line, and not "a" trend line), it is necessary that there are, at least, two points in it. With one point you can draw an infinite number of lines - no unique solution.
Anyway, if you want simply a line - and not specifilcally the trend line - you can add a series to your graph with a given number of repetitions of your single value.
Hope this helped...
Julio

Julio,Thanks. I had same thought, so took a step back and got around the problem using Stripline property on vertical axis

Related

If Measure Value = Something Then X Else Y End

I have 2 lines as measure values and I would like each line having their own % information but I cannot do that as a Text. Any workaround to get it to work?
Tableau file sample:
https://www.dropbox.com/s/1upehg61rg5psas/Percentage_on_success.twbx?dl=0
You should try a dual-axis with your two line measures and put the bars as reference lines. See this as an example. You can't independently control the Text on "Measure Values" because it is treated as a single measure.

Using the Overlay feature in panel but showing only an averaged line

I have created an overlay of 100 curves. I thought the image looked impressive but one of my reviewers stated that I should only show the averaged line. Meaning, only show a line that is the average of the 100 curves. Is this possible using the xtline feature, or do I need to get deeper into programming code to produce the graphic? Alternatively, it would be great if I could show both (the 100 curves and the averaged curve) in the same graphic.
You don't need anything complicated here. Just calculate the mean across the panel and show it directly. Here is some technique. I am guessing that in your real example with 100 curves a legend is pointless. Note the c(L) and read the help to find what it does.
webuse grunfeld, clear
set scheme s1color
gen log_invest = log(invest)
egen mean_log_invest = mean(log_invest), by(year)
line log_invest year, legend(off) lc(gs12) c(L) || line mean_log_invest year, c(L) scheme(s1color) ytitle(something sensible)

Cognos Chart with "No Data Available" although list shows data

I am completely new to Cognos, so sorry if I don't state some necessary information. I can't go into specifics about my chart, but here is the background:
I have a SQL code running into my Query
My chart and list use the same Query and have the exact same fields
My chart is a basic line graph
When I change my aggregate function to total for my y-axis, then I can see the data points
I do not want to use an aggregate function (I need to see all the points for my x and y-axis)
My x-axis is only one object, but it has multiple y-axis values within a year (which is my series). Ex:product-cost-year list,
where my product is the x-axis, cost is the y-axis, and series is year.
How can I get my chart to appear with all my data points? Eventually, I would like to add an upper and lower confidence interval to this chart.
One way to solve this issue is to create another column that simply counts the number of products (1,2,3,...9). We will call this column count. Keep all your fields the same (product for x-axis, cost for y-axis, and year for series). You will want to add count underneath product on the x-axis. You should see your mouse pointer turn to a horizontal line and it will place it under and to the right of product. Make sure not to place it just to the right of product.

Can't Remove y = 0 Line in Matlab

edit: I figured it out and don't see a place to mark this as answered. Thanks for the suggestions though everyone!
A couple of weeks ago I was trying to force MATLAB to display a y = 0 line for a plot I was making. It was easy enough to search for, but apparently I made it automatic. Now I can't find anything even remotely similar to this new problem. When I run this code:
plot(x,y_known,x,y_simulated);
legend('Simulated','This stupid line right here','Known')
I get the following:
Notice the line at y = 0, it is not in the code. I wouldn't really care, but it is the second line in the figure and it messes up my ability to create a legend. i.e., if the legend entry was just:
legend('Simulated','Known')
then the legend would say that the known value was green, which is certainly not the case.
I don't really want to create a handle for every single line I plot in the future, and would much rather just get rid of this line. Can anyone provide some help, or at least point me in the right direction?
edit: The y = 0 line also changes its line properties based on whatever is supplied to the first plot entry. So plot(x,y1,'--',x,y2); makes both y1 and y = 0 dashed, but plot(x,y1,x,y2,'--'); would just render the second line dashed
As an absolute last resort (after failing to find how the line actually gets there), what you can do is access the Children property of your axes and delete the child which is the line you don't want.
Something along the lines of:
ch = get(gca,'Children');
delete(ch(2)); %// Where 2 should be replaced by the child index you're trying to delete.
There was an errant two much earlier in the code, giving a variable 2 columns instead of one. I didn't realize Matlab would be helpful be helpful and plot both columns (I've always explicitly told it to plot both). Just another case of someone not thinking in vector mode when using Matlab!

How to set my column at the center of the chart with ShinobiCharts

I have this column chart that has 2 modes, monthly visualization and yearly visualization, the monthly visualization works just fine with many column, however, my yearly visualization is broken because i can't get the only column that appears to be on the center of the chart, it's always being set to the first point on my XAxis.
If I were using a NumberAxis it would be easy to solve, just set the column to the middle point (in this case, position 6 among the total of 12 months). However I'm using CategoryAxis, since it isn't ordered as NumberAxis is, I'm unable to use the same solution....
How can I achieve this result with a CategoryAxis ?
PS: No matter the SChartRange I set to this Axis, the column will always be set to the first position in the XAxis.
Found a way to achieve the result I wanted.
I've altered the range to be around the first dataPoint only, this way the column got placed in the middle of the chart without having to be the "middle dataPoint", being the ONLY dataPoint. The code goes into my sChart: dataPointAtIndex forSeriesAtIndex as follows
-(id<SChartData>)sChart:(ShinobiChart *)chart dataPointAtIndex:(int)dataIndex forSeriesAtIndex:(int)seriesIndex{
.
.
.
SChartNumberRange * numberRange;
if(isYearlyChart){
numberRange = [[SChartNumberRange alloc] initWithMinimum:[NSNumber numberWithFloat:-0.9]andMaximum:[NSNumber numberWithInt:(1)]];
}
The normal NumberRange I was using was from 1 through 13.
Hope this helps others with similar problems regarding this subject :)
PS: I'll mark this as the correct answer as soon as possible.