Showing posts with label totals. Show all posts
Showing posts with label totals. Show all posts

Sunday, March 11, 2012

cumulative totals in chart : Report Builder

Hi,

I am trying to display a line chart with cumulative totals over period of 12 months in a fiscal year. I know this can be achieveable in report designer using "Running value function".

Any idea how to achieve the same in Report builder ?

thanks in advance.

Here is the data :

Month Count

July 2

Aug 3

Sept 2

Expected output should be

Month Count

July 2

Aug 5(July count + Aug.Count)

Sept 7(July count + Aug count + Sept Count)

Regards,

bala

Hi guys,

Any idea how to achieve the above functionality in Report Builder ?

Thursday, March 8, 2012

Cumlative totals

I am developing a table in SQL Server for data analysis, and what i want to
do is have a cumlative total field. Is there a way when I am doing an insert
data, I could populate a column with a running total?
Thanks.Lyners,
Yes - one option is to create a trigger on the table to update the cumlative
total field.
HTH
Jerry
"Lyners" <Lyners@.discussions.microsoft.com> wrote in message
news:A408D891-7199-4B21-9F18-E6E88FE2C434@.microsoft.com...
>I am developing a table in SQL Server for data analysis, and what i want to
> do is have a cumlative total field. Is there a way when I am doing an
> insert
> data, I could populate a column with a running total?
> Thanks.|||the update and delete triggers might be quite involved.
Under most circumstances I would rather write a select query
calculating running totals - that would be way simpler|||Maybe...but Lyners just mentioned INSERTs so that doesn't seem too involved.
But agreed a stored procedure could be created to update the running total
column and then scheduled as a job for non peak hours.
HTH
Jerry
"Alexander Kuznetsov" <AK_TIREDOFSPAM@.hotmail.COM> wrote in message
news:1127943367.558805.246800@.g47g2000cwa.googlegroups.com...
> the update and delete triggers might be quite involved.
> Under most circumstances I would rather write a select query
> calculating running totals - that would be way simpler
>|||On Wed, 28 Sep 2005 14:13:05 -0700, Lyners wrote:

>I am developing a table in SQL Server for data analysis, and what i want to
>do is have a cumlative total field. Is there a way when I am doing an inser
t
>data, I could populate a column with a running total?
>Thanks.
Hi Lyners,
Why not create an indexed view, and have SQL Server do all the hard work
of changing the running total when the underlying data changes?
Look up CREATE UNIQUE CLUSTERED INDEX in Books Online.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||I made a procedure that uses a curser that goes through and updates all of
the running totals. Very fast and easy.
Thanks!
"Jerry Spivey" wrote:

> Maybe...but Lyners just mentioned INSERTs so that doesn't seem too involve
d.
> But agreed a stored procedure could be created to update the running total
> column and then scheduled as a job for non peak hours.
> HTH
> Jerry
> "Alexander Kuznetsov" <AK_TIREDOFSPAM@.hotmail.COM> wrote in message
> news:1127943367.558805.246800@.g47g2000cwa.googlegroups.com...
>
>

Wednesday, March 7, 2012

Cube/Rollup without Group By?

MS has been nice enough to add the Cube and Rollup operators so I can
have totals with my results.

But out of shear meanness they won't let me use them unless I use a
Group By clause in my select. I have a proc with 25 fields, and have
no desire to Group By anything- when a certain field changes, I just
want a row with the total of that field.

Is this possible?

Thanks,

BurtNot totally sure what you are asking, but maybe COMPUTE will do what you need.

SELECT col1, col2
from t1
COMPUTE SUM(col1)

Non-standard SQL I believe but occasionally useful.

Mike John

"Burt" <burt_5920@.yahoo.com> wrote in message news:19e5f39f.0309190842.50760c96@.posting.google.c om...
> MS has been nice enough to add the Cube and Rollup operators so I can
> have totals with my results.
>
> But out of shear meanness they won't let me use them unless I use a
> Group By clause in my select. I have a proc with 25 fields, and have
> no desire to Group By anything- when a certain field changes, I just
> want a row with the total of that field.
>
> Is this possible?
>
> Thanks,
>
> Burt|||You might find it necessary to put all the columns in the "select" clause
also into the "group by" clause, where you can then add a "rollup" or "cube"
clause. You might also find it useful to add a suitable "order by" clause.

Goetz Graefe
Microsoft SQL Server development -- Comments given as personal opinions and
suggestions only.

"Burt" <burt_5920@.yahoo.com> wrote in message
news:19e5f39f.0309190842.50760c96@.posting.google.c om...
> MS has been nice enough to add the Cube and Rollup operators so I can
> have totals with my results.
> But out of shear meanness they won't let me use them unless I use a
> Group By clause in my select. I have a proc with 25 fields, and have
> no desire to Group By anything- when a certain field changes, I just
> want a row with the total of that field.
> Is this possible?
> Thanks,
> Burt