Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Calculating Percentage Change


Calculating Percentage Change

Author
Message
Ryan
Ryan
SSC-Enthusiastic
SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)

Group: General Forum Members
Points: 100 Visits: 70
Comments posted to this topic are about the item Calculating Percentage Change

Ryan
-----------------
www.quadrus.com
lirioescano
lirioescano
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 3
Hi. I am working on a report, using SRSS, where I need to compute for the percentage change for the current fortnight versus the previous fortnight. The date range of the current fortnight is a parameter setting. Thus the previous fortnight is dependent on this current date range. To illustrate:

Current fortnight: June 20, 2011 to July 3, 2011 (parametized)

Item Count
-------------
A 5
B 3
C 11
D 2
E 0


Previous fortnight: June 6, 2011 to June 19, 2011

Item Count
-------------
A 4
B 1
C 13
D 2
E 6

Thus the resulting values I need to see are as follows:

Item % Change
-------------
A 25%
B 200%
C -15.00%
D 0%
E -100%

Can you suggest a script that I can set up/use in SRSS to get the percentage change, one that is similar to the sample function at the start of this discussion? Thanks!

Lirio
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search