SSRS Sparkline category with Lookup - reporting-services

I have a table in which I have to use SSRS Sparklines. But the requirement is that, I have to lookup the Y axis values and Category groups from another dataset, using a unique identifier in both the datasets. Lets say DS1 is the parent dataset and DS2 has got the Y values and Category (12 months) for the Sparkline.
I cannot use DS2 as Default dataset for the table, because it will result in writing lookup expressions for around 20-25 cells other than Sparkline cell.
So I used the below expressions for Sparkline.
Value axis :
=lookupset(Fields!RowID.Value,Fields!RowID.Value,Fields!Trend.Value,"DS2")
Category axis :
=lookupset(Fields!RowID.Value,Fields!RowID.Value,Fields!MonthName.Value,"DS2")
I used lookup set, because I believe we have to map a set of values to the Sparkline chart. But it throws me the below error.
Any suggestions to solve the error? Is it possible to configure a Sparkline without Category axis? I asked because I can manage my chart if SParkline can plot the trend values alone, without a category axis also.

You can use Join Keyword to avoid the "datatype that is not valid" error.
=Join(lookupset(Fields!RowID.Value,Fields!RowID.Value, Fields!MonthName.Value,"DS2"),"," + vbcrlf)
But the problem now is, All the Month names are displaying at one point in x-axis(Category axis).
Appreciate any help to get the Month names individually rather than at 1 point on category axis?

Related

Hide Empty Zero Data Points in SSRS Line Chart

I have an SSRS line chart that I need to figure out how to hide empty data points - stop the line from making markers/continuing the line where Category Group values are zero:
The values and series and groups are setup as so:
With the data looking like this:
I have tried filtering both at the chart level and the Category Group levels to filter out data that would create groups for Series 2020 and Category October/November/December, this creating or filling those points in my mind:
Where the expression is "=DateSerial(YEAR(today()),MONTH(today()), 1)" achieving the net result of filtering out data points/rows that from an incomplete month - meaning when the report would be run on 10/10/2020, only data from before 10/1/2020 should be used to generate groups.
The problem is that you are using COUNT() which will always return a value, zero if there are no records to count.
I created a simple dataset and using count of FILE_NUMBER I got this (replicating your issue) ...
The easiest way round this is to change the value expression to something like this...
=SUM(IIF(Fields!FILE_NUMBER.Value = Nothing, 0, 1))
This way we add 1 to the sum for every non-empty value and nothing if it's empty. If the total sum is still empty, by default, the chart will not plot that point.
So we end up with this...

Display data in single column

I have a table as shown below:
Table 1
I need to display data like below. I have tried using grouping but but i failed.
I have read some topics but can't find the solution. This should not be that hard.
Table 2
You can get that using LookupSet over a dumb group.
Add a tablix to your report and add a parent group in the Row Groups pane.
Use the below expression to create the group.
=1
That expression will create only one group, and you will have something like this in design.
Then use this expression in the highlighted cell in my screenshot above.
=join(
LookupSet(1,1,Fields!ColumnA.Value,"DataSetName")," - ")
Where Fields!ColumnA.Value is the field of X, Y and Z values, and DataSetName should be the name of your dataset.
You will get this result.
If you have repeated values in ColumnA they will appear repeated too in the cell. You will have to filter your dataset to get only unique values.

SSRS Graphing multiple lines using each column from database as x-axis

I can seem to figure out what how to set up a way to graph the following table into a graph with multiple lines. I have the following table:
I would like each row of the SRReportName be a different line and each column from ProcessingMinsYesterday and the rest (not SRReportName column) to be an value in the X-axis and the Y-axis to be that numerical value within the tables. So it would look like this:
You can represent each report by a line in the chart, just add SSRSReportName to the Series pane. However to get the desired x-axis you have to unpivot your ProcessingMins columns from the query.

SSRS merging columns based on vales

I am working on a matrix report in SSRS and currently have a column for each day. e.g day 1, 2, 3,4,5 and so on. I would like to merge those columns for the first 5 days so days 1-5 in column and name it <5. I have been working on expressions using if statements and switch but still not working.
Thanks
You can give a try to following steps:
Open dataset properties and under Fields, create a new calculated field (Let say name of the new field is YourDayFieldName_New) and put following expressions:
=IIf(Fields.YourDayFieldName.Value<=5,”<5”, CSTR(Fields.YourDayFieldName.Value))
Now in your matrix, do the column grouping on this calculated field (=Fields! YourDayFieldName_New.Value)

2008 SSRS Chart Secondary Axis Data Value not being displayed

I use 2008 SSRS and am new to SSRS. I am trying to create a bar chart that has a line chart as the secondary axis. Within the Chart Data window, under Values, I have 'loan_count' as the primary axis and 'offer_percent' as the secondary axis. Under Category Groups I have the column 'month'. Under Series Groups, I have the column 'metrics'. For the 'metrics' column (Series Groups), I created a filter: [metrics] in Ending Inventory, Inventory with Offer (includes 2 values).
Let's look at the secondary axis under Values. The column used is 'offer_percent'. This is the column that does not show up in the report. In my attempt to fix this problem, under its Series Properties I have an expression: =IsNothing(Fields!offer_percent.Value) <> true = true. I am using this 'not null' expression because 'offer_percent' is present (not null) only when 'metrics' = 'offer_per_inventory'. With this expression, the report still doesn't show the values of offer_percent.
I hope I am clear with my issues. Any input would be greatly appreciated!
Thank you!
Edit : format code