SSRS Line Chart X-Axis group by Month - reporting-services

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.

Related

Is it possible to limit RunningValue to look back for a certain number of rows?

Im trying to average the past 5 rows in my table i created in SSRS grouped by date(Monday of every week). Ive tried runningValue however it looks back at all the past rows for each group. Is there a way to limit the scope to just the past 5 rows or weeks for each Date group.
Thanks
I would accomplish this with grouping. I don't know what your dataset is like but I assume it is a SQL query you can modify. The easiest solution would be to add a week number column to your query. For example:
SELECT datepart(week, YOURDATE) as WeekNumber
More info on datepart:
https://learn.microsoft.com/en-us/sql/t-sql/functions/datepart-transact-sql?view=sql-server-2017
Once you have a week number, use the table creation wizard in Report Builder and add WeekNumber as a row group. This will group your values by week number and give you a total under each week. You can change the total by double clicking and making it AVG() instead of SUM().
Note: If you already have each 5 day period in a group, you should be able to right click that and add total. At which point you can just change the SUM to AVG there.

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.

SUM of a SUM in SSRS 2008

I've this report
Here I make the first sum because I've grouped values from each month (months are "Gennaio", "Febbraio", "Marzo" etc etc.). These values are hidden, but anyway I get the sum and I display the sum for each month.
Then I should make the second sum that use values for each month and display the total for each category. Categories are "TOTALE LAVORI RESTAURO", "TOTALE LAVORI EDILE" etc.)
This is the final sum, where I sum values from each category.
Everything is working well, but now I have to add a "month" parameter to the report that returns sums until a selected month. This parameter changes the sum 1 with this expression:
=Sum(IIf(Fields!mese.Value <= Parameters!mese.Value, Fields!costi.Value, 0))
Now, how should I change expression in SUM2 and SUM3 to work with this parameter?
If I copy that code, ther returns #Error and as far as I know I can't use ReportItems sum.
So any suggestion?
SUM #1 could remain Sum(Fields!costi.Value) because you need to display every months.
i.e.: display GIUGNO even if Parameters!mese.Value = 4 (APRILE).
So you have only to change SUM #2 and #3 because TOTALE LAVORI RESTAURO and TOTALI must show only costi from GENNAIO to Parameters!mese.Value; i.e. if Parameters!mese.Value = 4 display only GENNAIO-APRILE even if we have details about GIUGNO.
The expression gave error because you have NULL value in Fields!costi.Value or Fields!mese.Value: convert this value to zero in your DataSet and you won't have problems.

Line chart over Column chart in SSRS

I have a column chart with multiple series. (number of series vary from 1-14). X axis is date and Y axis is count.I would like to create a line chart which gives the sum of all series count per date. I tried adding another value of count and changing the chart type to line but the line is drawn with maximum series count per date. Also the label is repeating twice for every series.
Any suggestions on what I am missing?
Here is how I would do it.1. Rollup your Query in SQL - doing this will add a total value for each date as well as a total value for the entire query. Your query would look something like this:
select
YourDate,
YourSeries,
sum(YourCount) YourCount
from YourTable
group by
YourDate,
YourSeries
with rollup
2. Filter out the grand total - the with rollup clause produces a grand total that your chart doesn't need. You can filter this out of the dataset by adding a filter expression =IsNothing(Fields!YourDate.Value), datatype Boolean, value =False3. Set your chart values visibility - set the column values visibility to =IsNothing(Fields!YourSeries.Vale) and the line chart values visibility to =Not(IsNothing(Fields!YourSeries.Vale). Now, your chart and series legend will only show the daily columns and the total line.4. Put the total line chart on a secondary axis This is optional, but since the date totals will be much greater than each series/date value, it will keep the columns from shrinking so small.
It should look something like this:

Hiding row based on count of a group

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.