SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Need to add % sign for only few rows


Need to add % sign for only few rows

Author
Message
vandana_j79
vandana_j79
SSC Rookie
SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)

Group: General Forum Members
Points: 36 Visits: 86
Hi

I have SSRS (2008) Report which
line MTD YTD Total
Line 1- Balance 10000 200001 208987
Line 1- Volumne 100 200 330
Line 1- Avg 42 67 78
Line 2- Balance 10000 200001 208987
Line 2- Volumne 100 200 330
Line 2- Avg 42 67 78
Line 3- Balance 10000 200001 208987
Line 3- Balance 100 200 330
Line 3- Volumne 42 67 78

I want to add percentage sign only for Avg. Tried various things but nothing working. Anybody knows how to do this.
So Avg should be like 42%, 67%, 78%
All are numeric fields. Spread sheet attached having table

Many Thanks
Vandana
Attachments
Book1.xlsx (13 views, 9.00 KB)
Sean Lange
Sean Lange
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26307 Visits: 17553
Please see the first link in my signature about best practices when posting questions.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
abdulkalam.m
abdulkalam.m
Grasshopper
Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)

Group: General Forum Members
Points: 22 Visits: 168
use below expression in Avg column

="%" & cstr(Avg.Value)
abdulkalam.m
abdulkalam.m
Grasshopper
Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)

Group: General Forum Members
Points: 22 Visits: 168
try below expression

=IIF(instr(Fields!Line.Value, "Avg")," %" & CSTR(MTD.value),MTD.value)
Divya Agrawal
Divya Agrawal
SSC-Addicted
SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)

Group: General Forum Members
Points: 438 Visits: 604
vandana_j79 (1/18/2013)
Hi

I have SSRS (2008) Report which
line MTD YTD Total
Line 1- Balance 10000 200001 208987
Line 1- Volumne 100 200 330
Line 1- Avg 42 67 78
Line 2- Balance 10000 200001 208987
Line 2- Volumne 100 200 330
Line 2- Avg 42 67 78
Line 3- Balance 10000 200001 208987
Line 3- Balance 100 200 330
Line 3- Volumne 42 67 78

I want to add percentage sign only for Avg. Tried various things but nothing working. Anybody knows how to do this.
So Avg should be like 42%, 67%, 78%
All are numeric fields. Spread sheet attached having table

Many Thanks
Vandana

If you are calculating the average value and then showing in the report, just use the FormatPercent function in the expression.

--Divya
MMartin1
MMartin1
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2795 Visits: 2031

If you are calculating the average value and then showing in the report, just use the FormatPercent function in the expression.

--Divya


This is fine if the value is still a ratio, like .29. If the user already has 29 (multiplied .29 *100) then can do just a
CSTR(Fields!yourfield.value) + " %" in the cell's expression.

----------------------------------------------------
How to post forum questions to get the best help
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