How to I get the running total from a graph? - ssrs-2008

Im working with SSRS 2008. I have a bar graph showing me the defect counts. I am showing them with ranges from days to weeks or even months. Above it I want to show how many defects are actually being shown. For example if I show a range for two days. On day one there was 3 defects. Then on day two there are 2 defects. As you can see the total is 5 defects over the two days. What expression could I use that will bring back this value?
Thanks in advance
Zack

You can use RunningValue in your Value Expression:
=RunningValue(Fields!DefectCount.Value,Sum,"YourDataSetName")

Related

How to get three measures in a single chart?

I want three measures in a single chart.
Time spent by an employee in the office. (Available hours)
Time spent by an employee on productive tools. (Productive Hours)
Percentage of time spent productively. (PH : AH %)
I have used dual axis for 1 and 2 as 2 will always be less than 1.
I want it to look something like this
The problem is when I use blended axis it does not show the "tools hours" as a part of "available hours". So for example if an employee was available for 5 hours out of which he worked on productive tools for 3 hours the blended axis will show total available hours to be 8.
Your available hours is aways greater than your tools hours?
So, you should use a calculated Field where you show the tools hours and the "available hours" - tool hours.
It can also be solver by transforming your data source input.
PS: Yes, you can make formulas (calculated fields) across joins and blendings.

Last N Quarter, Month, Week, Date in Tableau

I want to show Last 2 Quarters, 2 Months, 2 Weeks and 2 days in one chart (As Columns). Dates are in a proddate. Any idea if this is possible. Right now im using separate charts and just putting them side by side.

Tableau: Four week moving average, first four weeks

Setting
As I'm sure many of you do in your vizs, I use date parameters for my data. This is great for creating trend analyses and all types of time series representations. Currently I'm using a line graph to show our sales hit rate history.
Picture
Question
The problem I'm running into is in creating a four week moving average. As you can see the four week moving average doesn't become just that until four weeks in! This creates quite the problem for me. What methods will enable the average at t=0 to show the average for the preceding four weeks?
Formula Used
This is my formula for creating the four week moving average:
WINDOW_AVG([Hit Ratio],-27,0)
Remove your date filter and try:
IIF(ATTR([DATE_FIELD])<T=0,NULL,WINDOW_AVG([Hit Ratio],-27,0))

Crystal Reports 9 Graphs/Chart

I have a cross tab with data showing clients per hour per day. So the rows are days of the week and the columns are the hours of the day, with the values being the number of clients.
Now to the main point :), I want to produce a graph for each day of the week, that shows the number of clients per hour for that day. So the report would have 8 graphs in total, one for each day and then an "all days" graph. See Picture:
Click, as I can't include pictures yet
Any idea how to do this, as I can't find a filter or anything, and the only graph I can get is all on one, with multiple bar lines for the days, in each hour block.
Ok, just figured this out :)
I have created a formula for each week day, that contains the following:
if {Command.day} = "Monday"
then {Command.kpi1}
else 0
Then in the chart expert, use this formula field for the values...so simple but overlooked :#

Sum last 52 elements without loop

Say I have a data set that has x-sections of country (US, CANADA) and then state/province then year then week. My data stack has 2 countries, 57 states/provinces, 3 years, and 52 weeks. I wanto to create a variable revenue that for each week, sums the last 52 weeks within the x-section.
Right now i have a loop but its very, very slow.
for each countries,
for each state,
for the last 2 years,
for each week,
sum the last 52 elements
Does anyone know how I can do this with vectorization?
You might want to look into using the function s=sum(X,DIM). Without more info about your dataset (please provide example), we cannot go into great detail.
For weighted sums over rolling window, filter() can work well.