Hiding row based on count of a group - reporting-services

I have a report with Year (which is a group) and then some other fields and totals (there are other groups that aren't relevant). I have a Grand Total Row at the bottom. I want to only show that row if there is more than 1 year in the report (otherwise it just duplicates the Year footer).
I am not sure what I can use to do this. I tried CountDistinct, but that is not in scope. Is there a way to get a count of the group sections (like Group("Year").SectionCount) or something?
I am using SSRS 2005.

Related

how do i group customer entries using months across different years in ssrs reports in nav

I am trying to get Sum of each customer ledger entries and group the Ssrs report into months across different years. For instance, I should be able to filter with the year 011117..310318, this should give me entries of each customer grouped per month: November, December, Jan(18), Feb, Match.
You can do this by using a matrix in your report.
Add the matrix and set the row group to group by Customer (whatever makes the customer unique such as an ID).
Add column groups by month and then a parent column group by year. If you don't have separate columns for months and years in your dataset, you can use expression into the group expression such as..
=Month(Fields!myDateField.Value)
=Year(Fields!myDateField.Value)
In the data 'cell' just drag the value you want to aggregate there.
That should give you a basic working matrix.
If you need more help refer to the SSRS documentation on the matrix control.
https://learn.microsoft.com/en-us/sql/reporting-services/report-design/create-a-matrix-report-builder-and-ssrs?view=sql-server-ver15

Calculating average in SSRS Matrix Table alongside filtered columns to separate out current versus previous years

I have a dataset, returned from a SQL query, that has the following data:
TYPE_CODE
YEAR
The data set spans the years 2014 through 2019. The TYPE_CODE has 6 different values.
How do I setup an SSRS matrix to provide the following layout and data:
So far I have a matrix setup (see the pic below) that has a row group (TYPE_CODE1) for the TYPE_CODE data, and two column groups (YEAR_PREV and YEAR_CURRENT) that are filtered as follows:
- The second column in the matrix is the YEAR_PREV group, and is filtered to not show 2019 data (YEAR <> 2019)
- The 4th column in the matrix is the YEAR_CURRENT group, and is filtered to only show 2019 data (YEAR = 2019)
This method correctly splits my data, with the green highlighted columns in the pic below representing what is correct:
What is not correct is the average column, as I cannot figure out how to setup that column to only average the columns to the left (the previous years - 2015-2018) and not include the column to the right (2019).
I have tried several different expressions to no avail, primarily trying to limit the count function to only the YEAR_PREV group, like so:
=count(Fields!TYPE_CODE.Value, "PREV_YEAR")/4
This throws an error telling me that something along the lines of "group cannot be used in aggregate function...".
How do I calculate the average column correctly?
You need to have 2 column groups with filters applied, first one where year equals 2015-2018 and the second one equals only 2019.
In between each of these columns you need insert your average column that will reflect years 2015-2018.

SSRS Sum values by week,month,and year

Report value of stock
I've created a stock value report.
The problem occurs with the addition of columns (month, year). I would like to set it to show the value of the last week in the month and year.
After reading your comment I think I know the best way for you to get there.
You want only the value of the last week within a Year/Month/Week column group. I would keep all the groups the way you have them setup with two small tweaks.
Drop the detail of the week group, keep the group, just no detail column group band.
Add a column group footer to the week group and simply apply the value as
=Last(Fields!WeekValue.Value)
That way you should have Year/Month and one column for weeks, the footer column and you simply pull across the last value from within that group.

SSRS Tablix - Total with Top N

I made a Tablix with Row and Column grouping that filters for the Top 10 highest. I also need Totals but it is totaling all of the records and of course I just want the total for the Top 10 ones in the table.
I tried using RunningValue but it doesn't reset with each Column Group.
How to get total of top 10 sales in SSRS 2012
Is there a way to only total the Top 10? I use the Dataset for other tables and charts so I'd rather not make separate ones (especially since I need the same functionality on other tables).

SSRS Line Chart X-Axis group by Month

everyone. For the life of me I cannot figure out why the X-Axis is pulling 2 dates in each month when I want it to group by each month. In the Values I have:
Value Field =RunningValue(Fields!new_actualsalesfromsplit.Value, Sum, "Chart1_SeriesGroup")
Category Field: =Fields!closedate.Value
Category Groups =Month(Fields!closedate.Value)
Group On =Month(Fields!closedate.Value)
Series Group by ["salesperson']
The chart should have a line for each sales person, and each month should be a cumulative representation of the sales by that person. Thanks for any help.
Set the category field to "=Month(Fields!closedate.Value)", or something similar that will net the results you need. Right now, even though you're grouping by month, you're still telling SSRS to use the atomic data for your X axis, so that's what it's doing.
It may make your task simpler to just add a Calculated Field to your dataset - open the dataset properties window, go to the fields tab, and click "add". Set that field to your month value, use it for grouping and your X axis.