Avatar of vbnetcoder
vbnetcoder
 asked on

=Format(Fields!fieldvalue.Value, 0) - shows negative like -123.23 i want it like (123.23)

This code

=Format(Fields!fieldvalue.Value, 0)

shows negative formatted like -123.23 i want it like (123.23)
SSRS

Avatar of undefined
Last Comment
vbnetcoder

8/22/2022 - Mon
Ryan Chong

you may try ABS function, like:

=Format(ABS(Fields!fieldvalue.Value), 0) 

Open in new window

vbnetcoder

ASKER
I tried that and it didn't show the negative as negative at all.

I need it to display like this (233.23)
Ryan Chong

ok, what about this?
=IIF( Fields!fieldvalue.Value < 0 , "(" & Format(ABS(Fields!fieldvalue.Value), 0)  & ")" , Format(Fields!fieldvalue.Value, 0)  )

Open in new window

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Scamquist

try


Format(Fields!fieldvalue.Value, "#,#0.00";(#,#0.00))
vbnetcoder

ASKER
That gives me an error
]
"character is not valid"
ASKER CERTIFIED SOLUTION
Scamquist

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
vbnetcoder

ASKER
ty
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.