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


Creating % based on total of rows


Creating % based on total of rows

Author
Message
OLIVER.MARSHALL
OLIVER.MARSHALL
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: 5
Hi

I have a report that shows the time it took to do jobs as well as the time it was predicted the job would take. So...

ActualTime=1
PredTime=4

I want a gauge to show the % of jobs that were completed within their predicted time. Thing is, I can't work out the formula.

Can anyone help?

Olly
pietlinden
pietlinden
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2171 Visits: 12477
Kind of an old post, but this is how i did it.

1. Add a calculated field to the dataset.
2. Function: OnTime=IIf(Fields!Actual.Value<=Fields!Predicted.Value,1,0)
3. Add a tablix to the report
4. 1st column: Actual, 2nd: Predicted, 3rd: OnTime (the calculated column)
5. Add a summary row, change the expression for the cell to:
=SUM(Fields!OnTime.Value)/COUNT(Fields!Actual.Value)
pietlinden
pietlinden
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2171 Visits: 12477
Kind of an old post, but this is how i did it.

1. Add a calculated field to the dataset.
2. Function: OnTime=IIf(Fields!Actual.Value<=Fields!Predicted.Value,1,0)
3. Add a tablix to the report
4. 1st column: Actual, 2nd: Predicted, 3rd: OnTime (the calculated column)
5. Add a summary row, change the expression for the cell to:
=SUM(Fields!OnTime.Value)/COUNT(Fields!Actual.Value)

Then just change the formatting of the cell in step 5 to Percent. Right-click, Textbox Properties > Number > Percentage > Decimal Places
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