LineChart using 2 Dataset in SSRS - sql-server

I want to create a line chart using 2 set of values.First value (i.e line) will show open report and second value(i.e line) with show closed report. The x axis will show months and y axis will show number(i.e sum of report). I tried using the following expression in the values
box of chart data but i am getting a straight line.
=Sum(Fields!Count.Value, "DataSet1") for line 1
=Sum(Fields!Count.Value, "DataSet2") for line 2
I am using cube to create my Dataset.

You cannot combine two datasets in the same chart. You need to combine the data into a single dataset or use the Lookup function if you have a common field between Dataset1 and Dataset2:
http://msdn.microsoft.com/en-us/library/ee210575(SQL.105).aspx

Related

facet_wrap: using x_free scale but having only 2 different x-axis with date

I performed on three sites in two different periods messurements. Now i want to show the results using facet_wrap. Here I want to have 2 columns (first line first period, secound line secound period) and each site in a row. To have only the respective dates in the respective graph, I use x_free, resulting in the desired graph. Now I would like to delete the X axis labels in the above graphs so that the date is only visible in the last graph.
My data looks like that:
enter image description here
My code for the plots is this one:
test_data$date <- as.Date(test_data$date )
Boxes <- ggplot(test_data, aes(date, number_bats)) +
geom_col(aes(date,number_bats)) +
facet_wrap(~Box, ncol = 2, scales = "free_x")
print(Boxes)
and the resulting graph looks like that:
enter image description here
How can I now delete the dates in the first two graphs, but keep it in the last one?
Thanks for your help!
I found this package "ggh4x" with an extended facet function (facet_grid2 and facet_wrap2) which solved my problem.

representing 2 different metrics with different columns in line chart

I am preparing a datastudio report. The data studio report consists of the following columns below:
As seen in the picture it captures metric data at a particular time.
The date range is set as the end_time
The X axis will represent the end_time column and the breakdown dimension will be InstanceName column and I am preparing to show it as line chart.
There are 2 metrics readops and writeops columns.
I need to represent these 2 metrics as 2 different lines in the same chart so that the read and write operation fluctuations for the instance at a particular time can be easily viewed.
I am not sure on how to represent this on data studio. If it is 1 metrics, i know it is straight forward. I can set instancename as breakdown dimension and end_time as dimension and date range is set to end_time and can represent it. But to represent the 2 metrics as 2 different lines for a particular Instance, with the time range on x axis, i don't know as I am very new to datastudio. I want to do it without drill-down. similar to the picture below which I got from google cloud console which shows ReadBytes the Big Triangle and the smaller one at the bottom in red for WriteBytes
Can anyone help me? Thanks
There are two approaches based on how the the charts need to be displayed:
1) Filter Control
If the aim is to only display 2 lines (2 Metrics):
readops
writeops
While allowing the user to select the required InstanceName, then a Filter Control (optionally with a default selection) could be used.
The chart would be set up using:
Dimension: end_time
Metric #1: readops
Metric #2: writeops
Editable Google Data Studio Report and a GIF to expand on the above:
2) Multiple Metrics
If the objective is to display a line for each of the InstanceName values as well as both the Metrics (readops and writeops), then the below approach would be one way.
Currently, when using a Breakdown Dimension, Google Data Studio charts (such as a Time Series chart) support a single metric.
Using the Data Set below, based on the screenshot in the question (Editable Google Sheets):
One approach is to create and use multiple CASE statements at the Data Source; for example:
readops_dum
CASE
WHEN REGEXP_MATCH(InstanceName, "(dum)") THEN readops
ELSE NULL
END
writeops_dum
CASE
WHEN REGEXP_MATCH(InstanceName, "(dum)") THEN writeops
ELSE NULL
END
etc...
Editable Google Data Studio Data Source and an image to elaborate:
A Chart could then be created with end_time as the Dimension and using the newly created Metrics; Editable Google Data Studio Report and an image to visualise with a Time Series chart:

Multi-line Text formatting on a Chart's bar value

Is it possible to format multiline text on series values labels for a stacked bar chart.
The image below is what I am after.
The things I have tried so far.
Add a table to the report with column groups for each grade. Each column group will have ten detail columns so I can draw the pesky arrow lines, actually two groups of ten, one for the line and one for the arrows. That would equate to 12 x 20 textboxes to support stupid arrows.
Row group by grade a place a chart in each group detail. This is fine and then I can play with the horizontal axis offsets and get an almost identical match, however, I need to have two rows of text per value on the chart, is this possible?
I am open for other options. I might attempt to migrate this over to a kendo chart as I have converted a few chart reports that are impossible to render on the servers.
Is it possible to format multiline text on series values labels for a
stacked bar chart.
Yes, it is possible. You can use Environment.NewLine to produce a new line in any SSRS expression.
Even you can use it in the stacked bar chart series label, just concatenate the value you want to show with the produced new line.
=Fields!FirstLineValue.Value & Environment.NewLine & Fields!SecondLineValue.Value
It should produce:
Hopefully this is what you need.

SSRS Chart Calculated Series alongside a Regular Series

I've noticed that in SSRS the ability to add a calculated series disappears if you already have a field filled in for the "Series Groups" part of the graph. Screenshot to demonstrate:
However I need to be able to add some calculated trend lines for the data and obviously removing the Series group renders the chart useless. How do I go about getting a Series and a calculated series on a chart?

Reporting Services Chart - Hard Coded Series

I am developing an SSRS 2008 report which contains a number of simple charts. On the x axis I have the 12 months of this year - Jan 2009 thru December 2009. On the Y is an integer value ranging from 0 to 100 in increments of 10. I am plotting the number of times an issue occurred per month. So January could have a value of 10, February 30, etc. etc.
I would like to have a horizontal line/series that is constant and shows the yearly average for 2008. So, say the average was 30 issues per month in 2008, I would like for that line to be shown in my chart. Basically, I want to draw a straight line across the chart for that value... I can see how to add more complex series, but this seemingly simple task is getting the better of me.
Doe anyone have any idea how this could be accomplished?
Thanks in advance,
Jason
[Update] To add some further details, I am already pulling the average for each row in my dataset and have it set up as its own series. However, rather than plotting a line, this approach plots individual points for each month. While this is close to what I want, I need to join the dots so to speak. The chart is of the Error Bar (Range) variety.
Can you use a column / line hybrid chart? If so then add a constant or dynamic target value to the chart:
Design the chart.
On the Data tab in the Chart Properties dialog box, add a new data value (for example, Target).
Set the target value (see the example in Figure 9 on link this uses a constant target value of 100000 across all categories but you can do it dynamically too). Make sure to use an expression starting with = (equals). Otherwise, the value is not interpreted as a numeric value.
See the example on the MS charts page at http://msdn.microsoft.com/en-us/library/aa964128.aspx
Add the yearly average to each row in the underlying the query. Add data series on just that value.
I managed to solve this issue myself.
As I mentioned, I was using an Error Bar graph. Right-clicking on the series of interest, I was able to change the graph type for that particular series - essentially leaving me with a chart with multiple graphs in it...particularly simple if you know where to look - which i did not! Thanks everyone for your suggestions.

Resources