Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a problem. In file i have a number-column where comma and dots are separators. And they are mixed up
i have : 1,205.34 ; 15,05 ; 12.64 ; 504,63 ... etc.
How i can Remove all except the last separator in qlik load , to get numbers as : 1205.34; 15.05; 12.64; 504.63 etc
what is your expected output in above scenario.
i want to get only one decimal separator : 1205,34 ; 15,05 ; 12,64 ; 3504,63 or 1205.34 ; 15.05 ; 12.64 ; 3504.63
should there be a comma in the qlick ?
after decimal separator, do you always have only 2 numbers or there is possibility to have more than 2 numbers
=Left(PurgeChar(fieldName,',.'),len(PurgeChar(fieldName,',.'))-2)&','&right(PurgeChar(fieldName,',.'),2)
or
=Left(PurgeChar(fieldName,',.'),len(PurgeChar(fieldName,',.'))-2)&'.'&right(PurgeChar(fieldName,',.'),2)
Regards,
thank you for your reply, but after decimal separator values can have 1 or 2 numbers not always 2 . Or they might be integer without any separators
i tried you solution, but it only works with numbers that have 2 num after decimal, if number has 1 digit after decimal i get " .47 " instead "4.7"
chk this,
=Left(PurgeChar(fieldName,',.'),len(PurgeChar(fieldName,',.'))-if(index(fieldName,'.')>index(fieldName,','),len(fieldName)-index(fieldName,'.'),len(fieldName)-index(fieldName,',')))
&'.'&
right(PurgeChar(fieldName,',.'),if(index(fieldName,'.')>index(fieldName,','),len(fieldName)-index(fieldName,'.'),len(fieldName)-index(fieldName,',')))
Regards,
thank you, it works better, but it still couldn't correctly transform integer number, i get "123.4" instead "1234"
it is working as per your requirements. & how became 123.3 became 1234? what is logic behind it.
mean *"123.4"
this is what how my raw data looks like
I attached the file in the header with the data for a more detailed understanding