Need Savings totals by month to pull data correctly and display in Chart - reporting-services

My data and this SSRS chart have a ton of problems, I'll try to keep my question(s) succinct.
First, as you can see by this chart and this screenshot of my data (just showing date and April Savings), my expression/chart is not summing all of the savings within a month, which is my goal.
It appears to be picking one amount within the correct month and using it. I set up a tool tip for April so I could see what number it's pulling (since clearly the chart columns are not representing the data whatsoever - another issue).
You'll see in the SQL data screenshot that it does indeed pull $1,230 from the April 2013 Savings. How can I get this to Sum within the month AND still do a running value from the beginning of time data began to current, this often will include multiple years.
Here's my Chart Data (note that my Team Goal works perfectly, and is even charted correctly - but if anyone knows how to force that line to go from end to end on my chart, feel free to let me know.) :
To summarize, how can I sum each month's data, while still do a running value across the months AND years?
Here's my Expression for Implementable Savings:
=RunningValue(Sum(Fields!ImplementableSavings.Value), Sum, nothing)
(obviously if I can get one working, I can get both)
My Expression for ImplementedSavingsMonth:
=MonthName(Month(Fields!ImplementedSavingsDate.Value))
My Expression for ImplementedSavingsYear:
=Year(Fields!ImplementedSavingsDate.Value)
Let me know if there's anything else I can provide.
Quick sidebar question: WHY does my chart column collect one piece of data. IE: see the tool tip $1,230 for April 2013), but the chart column displays that the number is around $1.7M? And in this scenario, both of my blue and yellow columns are displaying the same number, so why does blue always appear to be a higher number? I will ask this as a 2nd question if it's inappropriate for me to ask here.

I would use this Expression for Implementable Savings:
= RunningValue ( Fields!ImplementableSavings.Value, Sum, "Chart1")
.. assuming your Chart's name is Chart1.

Related

I'm trying to aggregate a measure in Power BI Report Builder and getting nowhere

I am working on a sample project in Power BI Report Builder. (I couldn't tag it as such because apparently I'm not allowed to create my own tags on this website.) The measure I am going for in my data cube is called Direct_Claim_Deductible_Recoverable_End_of_Year, but we will call it "Deductible" because that's too long a name to type out every time. I am trying to divide it up by the fields of State, City, and Year.
The Category column tells you whether each row is for a state or a city within that state. The Year and Location columns tell you the year and location that the row is telling you about. The Deductible column shows that measure. The Pct% column formula is Deductible - Total. (I added the Total column because I was having trouble with the Pct% column and wanted to know what was going on.)
Here's where the problem begins.
The Total column is supposed to tell me what the total deductible is for that specific year. But instead, it just gives me the grand total for all years in the cube. I've run the report enough times to know that this number is $99,669.71.
Here is the formula I am using for the Total column:
=round(Sum(Fields!Direct_Claim_Deductible_Recoverable_End_Of_Year.Value),2)
The Pct% column is giving me wrong answers too, but it is based on the Total column, so fixing the Total column should also fix the Pct% column.
And the data bar is supposed to show me what percent of the total for that year is in that state's row, or what percent of the total for that state is in that city's row. Instead it gives me an error message saying I am missing a closing parenthesis ')' somewhere:
The Maximum expression for the chart 'DataBar2' contains an error: [BC30198] ')' expected.
Here is the code I used:
=(Sum(Fields!Direct_Claim_Deductible_Recoverable_End_Of_Year.Value) / (Sum(Fields!Direct_Claim_Deductible_Recoverable_End_Of_Year.Value), "StateDS"))
As you can see, all three sets of parentheses are opened and closed.
I did figure out that if I move all the parentheses to the end, like so:
=(Sum(Fields!Direct_Claim_Deductible_Recoverable_End_Of_Year.Value) / (Sum(Fields!Direct_Claim_Deductible_Recoverable_End_Of_Year.Value, "StateDS")))
I resolve that error message but get a different one:
The ValueAxis_Primary.Maximum expression for the chart 'DataBar2' has a nested aggregate that specifies a dataset scope. Inner aggregates cannot specify a dataset scope.
It seems to be telling me that I cannot have the denominator of the fraction for the City data bar specify that its scope is the dataset "StateDS", which is the dataset that aggregates by State alone. But I am confused. I don't understand why that would be. And I don't understand what I need to do to make it aggregate by state anyway.
Thank you.

SSRS Target Line

I would like to re-create a line chart in SSRS like the one below (created in excel)
Target vs Revenue
I can re-create the running value (green line - revenue) but I have no idea how to do the straight target line (grey one) that should end at the end of the current month. The value for this line comes from a text parameter (I type in the target for current month manually), so ideally this should be a running value of the parameter number divided by the number of days for this month ending on the last day.
Can I have an angled StripLine to achieve that or shall I use an expression, if so, can you help me to build it, please?
Thank you for your help.
This answer assumes you know what month you are running the report for and you can therefore determine the number of days in that month. I won;t cover that here, ask a new question if you can't do that.
To create your target line, open your dataset properties, click the 'Fields' tab and Add a new field.
Call the new field Target or whatever you want and hit the fx button next to field source. Set the field source to following expression.
=(Parameters!Target.Value/31) * DAY(Fields!myRevenueDateField.Value)
You will just need to swap out the 31 for the actual number of days in the month, and the correct date fields from your dataset.
I used some sample data in my test with a target of 3000 and got the following result.

SSRS - creating chart - overlapping year - end of year/start of next

I have to report on some data covering November, December of 2013 and Jan, Feb of 2014. I know how to chart over a calendar year but I'm struggling with this...any one know how i can chart this in nov,dec,jan,feb order???
cheers
You have to have some field available in your dataset or a calculation based upon a field/fields that orders them correctly. If you have something like yyyy-mm (ex: 2013-11) you can set the sort order of the category group within your chart. Leave the actual value as you want it to be seen, just change the sort order.
Here's a good blog post that (I think) explains exactly what you are trying to do: http://www.allaboutmssql.com/2013/06/ssrs-in-charts-how-to-sort-labels-on-x.html
Sort the data first by =Year(Fields!YourDateField.Value) and then by =Month(Fields!YourDateField.Value)
Thanks for the input... i found this Custom ordering of series field for stacked chart in SSRS08 TFS
so i manually changed the value value with a switch and then ordered A-Z
All good now
cheers

SSRS 2005 line graph Series / Interval

Afternoon all,
I have a simple bar graph in SSRS 2005 that displays data in a web page. The space that i have allocated on the web page is very small but is required.
I have a report that pulls data back for the last 24hrs and plots this on a graph. I have placed 'Timestamp' data on to my graph and it is located at within the 'Drop category fields here' section.
As the space that i have for my chart is only small the 24hr timestamp labels look too busy and look messy. Is there a way i can format this area so it only displays a label on the 6th, 12th, 18th and 24th interval?
I have reduced the label already by formatting the timestamp using the below but think i need to reduce the number of labels for the timestamp.
=Format(Fields!TimeStamp.Value, "H:mm dd-MMM")
Regards
Bet
Try looking at the Major gridlines interval:
Which gives me a result with some junk data:
So it might not be 100% perfect for what you want, but hopefully will be helpful. Unfortunately SSRS 2005 charts are a bit limited in functionality so it's a case of trying to do the best with what you have.

SSRS- Bar Chart with single bar needs to display Percentage data

I have a requirement to show percentages in bar chart on a single bar using SSRS. For example, I want to show a employees by Age in a percentage in an SSRS report.
1.How many % employees between age 20 and 30?
2.How many % employees between age 30 and 40?
3.How many % employees between age 40 and 50?
All this on a chart which has only single bar chart in percentage?
Is it possible?
Thanks
Not sure I'm really understanding the question ("a chart which has only single bar chart in percentage"?), and I realise it's an old one, but I just came here with what I think is the same problem, and wanted to offer the solution I've come up with.
As far as I understand it, you have a bar chart which shows employees grouped by age. Age bracket along the X axis, number of employees (which I'll presume is calculated by something like "COUNT(Fields!EmployeeID.value)") up the Y axis. You want to see the percentage of employees which fall into each bracket.
What I've done is go into the chart properties, "Data" and select the "Values" entry for "Employees" (or similar). Then, hit Edit and add point labels, with a data label such as:
=COUNT(Fields!EmployeeID.value) / COUNT(Fields!EmployeeID.value, "Employees")
Where "Employees" is the name of your data set.
This is dividing the value of the current data group (from the "Values" tab) by same value but taken over the whole dataset.
Enter a format code of something like "#0%", et voila!
It achieved what I was after, and I hope it can help others with the same question.
You can easily do it in 2008, but I guess that's not what you wanted to hear.
So basically you want the concept of a pie-chart but as a single bar (known as a linear gauge in 2008)?
I don't think you can. This is about the limit of what you can do
http://msdn.microsoft.com/en-us/library/aa964128%28SQL.90%29.aspx
You could always buy dundas http://www.sql-server-performance.com/articles/reporting/Enhancing_Reporting_Services_with_Dundas_Reporting_Controls_p1.aspx
essentially this what MS have rolled into 2008