Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
hammermill21
Creator III
Creator III

Removing Underscores & Making Everything Caps in Data

Hello,

I'm pulling in data that looks like this:

briggs_stration_8kw_

I want to remove the underscores and just have spaces along with Putting everything caps. How can I go about doing this in the backend?

Thank you!!

1 Solution

Accepted Solutions
Nicole-Smith

In addition to ogster1974‌'s response, you may want to use Capitalize() instead of Upper() if you only want the first letter of each word capitalized.  You may also want to use Trim() to get rid of any leading or trailing spaces:

Trim(Capitalize(Replace(YourField, '_', ' ')))

View solution in original post

8 Replies
ogster1974
Partner - Master II
Partner - Master II

Upper(Replace('fieldname','_',' '))

Nicole-Smith

In addition to ogster1974‌'s response, you may want to use Capitalize() instead of Upper() if you only want the first letter of each word capitalized.  You may also want to use Trim() to get rid of any leading or trailing spaces:

Trim(Capitalize(Replace(YourField, '_', ' ')))

hammermill21
Creator III
Creator III
Author

What if I want to do if for multiple ones?

ogster1974
Partner - Master II
Partner - Master II

Upper() will force all letters to be capitals.

ramasaisaksoft

Syn:-PurgeChar(<feildname>, '[chars to remove]')


Upper(purgechar(FieldName,'_')) as Fieldname1

else

=upper(PurgeChar ('briggs_stration_8kw_','_'))


hammermill21
Creator III
Creator III
Author

Hi Nicole,

Thank you!

What if I want to do this change to multiple items like,

 

spectrum__1250ds4
caterpillar__300
onan__dfej5745347_
ford_15kw

So it's not just for one item I need to do this for a few different ones.

Thank you!

OmarBenSalem

all the above methods, will change every value of ur field..

one advice though: please try the proposed solutions before wondering if they would work

hammermill21
Creator III
Creator III
Author

Thanks Omar, I did but when trying to do it for more than one I was getting errors... But thanks....