Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to convert negative values to () brackets

How to convert negative values to () brackets.

-7 to (7)

And i have columns with null values and i need that to insert as null and it should not throw any null error

 

 SRC

ColA  ColB

          2

-1       -7

TGT -- Output

ColA  ColB

          2

(1)     (7)

Labels (2)
2 Replies
manodwhb
Champion II
Champion II

@ravi777,try this one

(!row3.newColumn1.equals("") || row3.newColumn1!=null) &&row3.newColumn1.contains("-")?"("+row3.newColumn1.replace("-","")+")": row3.newColumn1 

manodwhb
Champion II
Champion II

@ravi777,still do you have this issue?