8 Replies Latest reply: Aug 26, 2016 8:48 AM by Robson Candeo

# negative number in brackets

I have a text object that I wanna show as number with % and when it´s negative I wanna it in brackets.

It works if the result is +20.29%, but if the result is (8.85%) it shows (0.09%)

The expression is as below:

=num((

max(Aggr(

(sum({<[Reporting Calendar Year] = {'\$(vCurrentYear)'}>} \$(vCurrency)) - sum({<[Reporting Calendar Year] = {'\$(vPriorYear)'}>} \$(vCurrency)))

/

sum({<[Reporting Calendar Year] = {'\$(vPriorYear)'}>} \$(vCurrency)),

[Broker Pack Region]))

-

max(Aggr(

(sum({<[Reporting Calendar Year] = {'\$(vPriorYear)'}>} \$(vCurrency)) - sum({<[Reporting Calendar Year] = {'\$(vPriorYearBefore)'}>} \$(vCurrency)))

/

sum({<[Reporting Calendar Year] = {'\$(vPriorYearBefore)'}>} \$(vCurrency)),

[Broker Pack Region])))*100

,'+ ###.##%;(###.##%);-')

Any idea what to do?

• ###### Re: negative number in brackets

As i got, If you got +ve value then 12.43%

Meantime, While selection if you got -Ve value then (-12.43%) -- Is this you are expecting? Or What

• ###### Re: negative number in brackets

sorry not being more clear. With positive(+) value then works.With negative(-) values it is showing divided by 100, so when should see (12.43%) it shows (0.12%)

• ###### Re: negative number in brackets

It's tricky t explain, Can you post sample application which demonstrates the issue

• ###### Re: negative number in brackets

thank you. it´s solved

• ###### Re: negative number in brackets

=Num((

max(Aggr(

(sum({<[Reporting Calendar Year] = {'\$(vCurrentYear)'}>} \$(vCurrency)) - sum({<[Reporting Calendar Year] = {'\$(vPriorYear)'}>} \$(vCurrency)))

/

sum({<[Reporting Calendar Year] = {'\$(vPriorYear)'}>} \$(vCurrency)),

[Broker Pack Region]))

-

max(Aggr(

(sum({<[Reporting Calendar Year] = {'\$(vPriorYear)'}>} \$(vCurrency)) - sum({<[Reporting Calendar Year] = {'\$(vPriorYearBefore)'}>} \$(vCurrency)))

/

sum({<[Reporting Calendar Year] = {'\$(vPriorYearBefore)'}>} \$(vCurrency)),

[Broker Pack Region])))*100

,'+###.##%;(###.##%)')

• ###### Re: negative number in brackets

thank you but didn´t work

• ###### Re: negative number in brackets

Use

Num(YourExpression,'+ ###.##%;(###.##)%')

watch the place of the ) and %

• ###### Re: negative number in brackets

This works. Thank you so much