Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Need to add % sign for only few rows Expand / Collapse
Author
Message
Posted Friday, January 18, 2013 5:57 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Today @ 3:39 AM
Points: 10, Visits: 56
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


  Post Attachments 
Book1.xlsx (9 views, 9.32 KB)
Post #1408849
Posted Friday, January 18, 2013 7:19 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:59 PM
Points: 12,031, Visits: 11,061
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 Moden's 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)
Post #1408904
Posted Monday, January 21, 2013 4:46 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, January 21, 2014 12:48 AM
Points: 10, Visits: 158
use below expression in Avg column

="%" & cstr(Avg.Value)
Post #1409481
Posted Monday, January 21, 2013 5:01 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, January 21, 2014 12:48 AM
Points: 10, Visits: 158
try below expression

=IIF(instr(Fields!Line.Value, "Avg")," %" & CSTR(MTD.value),MTD.value)
Post #1409490
Posted Tuesday, January 22, 2013 3:51 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, April 21, 2014 9:42 AM
Points: 141, Visits: 527
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
Post #1409904
Posted Wednesday, March 27, 2013 10:51 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 2:06 PM
Points: 225, Visits: 700

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.

Post #1436040
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse