SSRS - Matrix with multiple datasets - reporting-services

I currently have an existing SSRS report which uses 2 datasets of data from a stored procedure, which is then aggregated in a bunch of matrix tables which automatically splits out columns by calendar months.
I have been asked to add a row from another table, and can add in the column through the Expression feature, but this does not take account of the month split, so it just adds in the total and repeats it for every column. Is there a way for it to be grouped by the month (month column is common between the two datasets, and they both run for the same time period.)

You can do this with an outer column group. You already have one by day, I guess. If you add another column group and make it grouped by YYYY-MM or another unique value then you can drop the SUM(Fields!ValueToSumByMonth.Value) in the new groups footer (add subtotal - after).

Related

Getting SSRS to aggregate as rows instead of columns

I've constructed a cube using SSAS, and I'm using that cube to fuel an SSRS report. Using Excel, I can generate reports as pivot tables from the SSAS source, and I'm trying to replicate some of that functionality as a report in SSRS instead.
Here's how I have the thing set up in Excel:
As you can see from the pictures, I have several stats that are being displayed per row rather than per column. The results that are displayed per row are aggregated statistics (sum, count, etc...).
How do I accomplish this same thing using SSRS? In Excel, it was simply a question of saying "Move to Row Labels".
You can create a Matrix, set the column group to be by fiscal calendar .
Within the row group you will need to add additional detail rows and place each value on the row.
This should give you the desired results more of less.

add column group below previous column group SSRS

Is it possible to move a column group below another column group?
For example, I have report that shows the schedule for a week. The column groups are Day, Date, and Time Range. So the report should show as
Saturday
21-APR
09:00 - 12:00
Details here
13:00 - 14:00
Details here
right now it shows the two time range groups side by side.
The only way I can think of doing this is to use a sub report.
The subreport would take a single day as a parameter and if you have any row grouping, it would also have to accept a parameter to identify which row it belongs to.
The subreport should be built so that passing it a single day shows all the time ranges stacked with details. To do this, add a parent row grouping to details group, grouped by the Time Range field.
In your main report, your row grouping (if any), would remain the same, just make sure it does not group by any of the time related data that will appear in the columns.
Set the Column grouping to Day/Date and insert your subreport into the data cell area of the matrix.
If any of this is unclear please post some sample data and sketch up the required output so I can put together a more detailed answer.

Display calculate total from the separate column

I work with CRM. Now I create some report from SSRS.
I need create some table like this:
I can not create last column of the table. This column must contains sum of all rows previous column from groupping. How to do it? I work with crm online. Reports to CRM online can not use SQL - only fetch. And even I would can calculate value of this column from query I can not place it in last column - only second column because we are using grouping.

SSRS Previous Function not calculating first time around

I have a report that I built in SSRS that calculates a sum of numbers for every business day going back 10 business days. There is a column group for each business day, and there are row groups for each item being totaled. The function to calculate the sum is a simple:
=Sum(Fields!INCOME.Value)
This returns data for example as such:
Now I am creating a report to indicate the change in data from day-to-day. I figured this would be simple with the Previous() function in SSRS. So I took the same dataset and in a new tablix I replaced the original calculation with:
=Sum(Fields!INCOME.Value)-Previous(Sum(Fields!INCOME.Value),"ASOFDT2")
The Column group is called ASOFDT2. This seems to work for all but the very first column, I get the following as a result:
My question is, does anyone know why this calculation is not performing in the first group, but is for all the rest? How can I make it properly calculate the first iteration of this? For informational purposes, I'm using SQL Server 2014, and I am building the report in Visual Studio 2013.
I have also reviewed the SO question: Use of Previous() function in reverse date sorted data in SSRS? though I am not sure how to apply this to my problem. The first column is my most recent set of data and I cannot select one column newer and just hide it.
The Previous() function gets the data in the Previous column. It doesn't have any understanding of what that data is, so if your columns are in Descending order, the Previous column will be the Next day, not the Previous day
It shouldn't be too hard to include the differential data in your dataset instead of trying to calculate it in the report. Just join the table to itself on YourDateColumn = DATEADD(dd, -1, YourDateColumn), and the right side of the join will have the previous day's data, and you can subtract for the difference.

Exclude hidden table row from total

I've created a table with a group filter so some values stay hidden.
However, the row that shows the sum() of the above values, still counts the filtered values.
Usually I would apply the filter to the query, but I'm also using this same dataset in other tables on the same report so that's not an option.
Am I missing something here, or is this a flaw in MS Reporting Services?
This appears to be a "feature" of SSRS, apparently because it calculates values in table headers and footers before rendering the detail section of a data table.
One way around this would be to add a derived Boolean column to your dataset (assuming your data source is SQL Server, using a CASE statement or similar) showing whether the row should be excluded from the table where the filter is required.
You can then change your table filter to check the indicator, and use a expression to carry out a conditional sum to aggregate the correct total. Something like
=SUM(Iif(Fields!ExcludeRow.Value = True,0,Fields!ValueToSum.Value))
It's more of a question than answer...
How to resolve this issue if you know whether the row is hidden or not ONLY at the Row Group level?
i.e. if you're filtering on the totals by this Row Group, i.e. you cannot have a field indicating if Row is excluded or not in a dataset.
ex: I have AR Aging report which has totals per months, patients. I need to filter out negative totals per patients (Patient row group), but I have column groups as well - per month, so my dataset cannot be per-patient granularity and therefore, the only place SSRS can decide whether to hide or show the row is on the Row Group level...
I had the same issue but I had too many column totals where to enter the Iif().
I resolved it by removing the filter from the group and putting the filter into the Tablix Properties dialog box (Select Tablix, Right-click the top left corner grey box and choose Tablixc Properties).