Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Removing a character from the field values

I have a field with Sales values like 1.5 M, 2.5 M etc.,

How to remove M suffix from a field?

The reason for the removal is, Qlikview automatically takes the M character and converts it into some values. Instead I need 1.5, 2.5 as it is.

9 Replies
tresesco
MVP
MVP

Mid(Sales, Len(Sales)-1)

And note, 'M' might be for Million

PrashantSangle

Hi,

Use purgechar()

try like

purgechar(fieldName,'M')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
ChennaiahNallani
Creator III
Creator III


Replace(YourFiledName,'M','''')

prma7799
Master III
Master III

Hi ,

As Tresesco said 'M' might be for Million.

can you please check with chart properties Number format >million symbol

Thanks

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

PFA..and If not enough u can use Replace Function also.

sujeetsingh
Master III
Master III

Replace function will do your work.

krishna20
Specialist II
Specialist II

Hi,

Try Subfield(). It may works.

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Please use PurgeChar(FieldName,'M')

amit_gupta
Contributor III
Contributor III

Hi Koushik,

In case of Just removing character from String you can use this:

PurgeChar(text, remove_chars)

Example Result:

PurgeChar ( 'a1b2c3','123' ) Returns 'abc'

PurgeChar ( 'a1b2c3','312' ) Returns 'abc'

In your Case:

PurgeChar ( '1.5 M','M' ) Returns '1.5'

For all values

PurgeChar ( Sales,'M' )

Note: It will remove the perticular char from your string.

However, I feel that in your case Sales is measure data, you need to put condition you convert into million by multiplying 1000000.

I hope, it will help you