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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
abhi90
Creator II
Creator II

Replace $ in SalesData Column

I have a Column Where SalesData is coming. Now with Numbers in start of the data $ is coming. as well as some Data is having value like "$-" which I have to replace with "UNK" otherwise as it is. Now I am trying with replaceall in tmap variableport.Both can be handled in One tmap VariablePort?

Sample Data

$10700.50

$-

@rhall@TRF@manodwhb@vboppudi

Labels (2)
1 Solution

Accepted Solutions
vboppudi
Partner - Creator III
Partner - Creator III

row2.Amount.equals("$-")?"UNK":row2.Amount.replaceAll("[^\\d.]", "") 

 

Regards,

View solution in original post

6 Replies
vboppudi
Partner - Creator III
Partner - Creator III

Yes, you can handle both in tMap variable ports.

 

Regards,

abhi90
Creator II
Creator II
Author

In One Variable Port I want to do. I am doing like this now:

row1.COLUMN.replaceAll("$","")=="$-"?"UNK":row1.COLUMN.replaceAll("$","").But not working. @vboppudi

vboppudi
Partner - Creator III
Partner - Creator III

try below one

0683p000009LwnQ.png0683p000009LwnV.png

Regards,

abhi90
Creator II
Creator II
Author

Hi @vboppudi,

Can You please write the replaceall part?It's almost impossible to read

vboppudi
Partner - Creator III
Partner - Creator III

row2.Amount.equals("$-")?"UNK":row2.Amount.replaceAll("[^\\d.]", "") 

 

Regards,

abhi90
Creator II
Creator II
Author

Yes.It's perfectly working.Thanks a lot @vboppudi 0683p000009MACn.png