Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Formatting numbers on a chart?

Author  Topic 

Adam West
Constraint Violating Yak Guru

261 Posts

Posted - 2009-11-19 : 17:16:18
HI I have a good working chart but the numbers used there - I need to format them. Currently they show as 1234.1234
I would like to have $1234.12. When I right click this in design all it shows is
Series Properties
but none of the options indicated formatting the number.

What I meant is, I have this expression:

=Sum(Fields!EXPENSE.Value)

how can I format this as needed?

JCirocco
Constraint Violating Yak Guru

392 Posts

Posted - 2009-11-20 : 09:37:04
Add a Round function to the expression and you should be fine.

=Round(Sum(Fields!EXPENSE.Value), 2)



John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page

Adam West
Constraint Violating Yak Guru

261 Posts

Posted - 2009-11-20 : 10:02:59
Thank you John, also I need the '$' on that. I can do the number formatting in the chart but the title field, if you will, does not have the number' option.

Can i change the SQL, for Budget_Amount, how can I make this as $1234.01 right in the SQL?



CREATE TABLE #TEMP (CUSTNMBR VARCHAR(50), CATEGORY VARCHAR(100), BUDGET_MONTH INT, BUDGET_YEAR INT, BUDGET_AMOUNT MONEY)

DECLARE @USCATVAL VARCHAR(50), @I INT, @SQL VARCHAR(100), @Custnmbr1 varchar(50)
Go to Top of Page

JCirocco
Constraint Violating Yak Guru

392 Posts

Posted - 2009-11-20 : 16:19:03
Should be able to Concat the $ in the expression. Not at home but something like

="$" & Round(Sum(Fields!EXPENSE.Value), 2)


John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page

JCirocco
Constraint Violating Yak Guru

392 Posts

Posted - 2009-11-20 : 16:43:53
you could also try the Format property of the text box where your expression is. This "might" work...

$#,##0.00;($#,##0.00);''

John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page
   

- Advertisement -