Desconsider characters when sorting column
Desconsider characters when sorting column
quinhobooz
Posts: 12Questions: 3Answers: 0
I have a column with amounts that comes wish currency tag (USD, EUR and BRL) and when sorting the column it does not work.
https://jsfiddle.net/goy0reun/1/
What do I need to do to avoid those currency tags plus the space ('USD ')
This question has an accepted answers - jump to answer
Answers
Use Orthogonal data to remove the currency tag and spaces for the
filter
operation.Kevin
Hi Kevin,
I did, but I'm probably doing something wrong cause still not sorting correctly.
See below:
https://jsfiddle.net/j0ufm321/3/
Close. You will need to more modifications to have the value sorted as a number. Like this:
https://jsfiddle.net/tnwbdk4g/
The
12.785,76
will need to look like12785.76
for numeric sorting. First remove the periods then change the comma to period. Lastly use trim() to remove the white space. Since you are changing the data type from string to numeric you also need to apply this change to thetype
detection operation.Kevin
I Got close to that, forgot the trim() function.. Thank you so much!!