Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Want to display -123 as (123) in expressions
Example:
if ((sum(x) + sum(y) +sum(z)) - (sum(x) + sum(y) +sum(k))) < 0
then i want to display (14000) instead of -14000
Any help is appreciated
It gives same value. It doesnt give brackets accross negative value.
I want (14000) if the value is -14000
How is your PC set up with National Language settings? US or some other number formatting?
Under number tab of the chart properties, select expression default to give effect of the num function explained by the other friends, or select integer / fixed to and update # ##0;(# ##0) in the Format pattern.
US
Then it is a mystery to me why you can't get this simple thing to work ...
It certainly works... ![]()
Hi,
another sample application:
using this sample data:
I reduced
(sum(x) + sum(y) +sum(z)) - (sum(x) + sum(y) +sum(k))
to
sum(z)-sum(k)
as it should be equivalent.
IMO petter-s approach, defining a format string, is the most straight forward and elegant solution to your problem.
hope this helps
regards
Marco
It works for the example that Michael Solomovich showed.
But it didnt work for my expression.
here is what I did
Num( RangeSum(Before((sum(P_QTY) + sum(D_QTY) +sum(ND_QTY))
-
(sum(P_QTY)+ sum(D_QTY) +
SUM(IP_QTY-WIP_QTY) + IF(GetSelectedCount(ITEM_NAME)>0, SUM(IP_QTY)*MAX(SPLIT_PCNT),SUM(IP_QTY))
+ Sum(O_QTY) + SUM(O_QTY)),0,ColumnNo())) , '0;(0)' )
I think I am messing up bcz of the long expression.
First, see if the expression works without formatting.
If it doesn't, fix it first. If it does, add formatting:
num(<your long expression>, '#,##0;(#,##0)')