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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to trim the data?

Hi Friends,

I have a column with data like "00125460014600-CD", i want to trim and the output should be in 12 digits "125460014600".

Means trim first 2 digits and last 3 digits. Please help me out.


Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Then,

Mid(DmdUnit,3, len(DmdUnit)-5)

Assuming that the data in the field would be of similar format.

View solution in original post

6 Replies
tresB
Champion III
Champion III

Try this:

Mid('00125460014600-CD',3, len('00125460014600-CD')-5)

kogasawara
Partner - Creator
Partner - Creator

hi!!

try this!!

-------------------------------------------

mid('00125460014600',3,12)

-------------------------------------------

Anonymous
Not applicable
Author

say if a column(DmdUnit) has n no of data , how can i use the above conversion?

Anonymous
Not applicable
Author

say if a column(DmdUnit) has n no of data , how can i use the above conversion?

tresB
Champion III
Champion III

Then,

Mid(DmdUnit,3, len(DmdUnit)-5)

Assuming that the data in the field would be of similar format.

kogasawara
Partner - Creator
Partner - Creator

hi thank you for your replay!!!

how about this??

=left(right(DmdUnit,len(DmdUnit)-2),len(right(DmdUnit,len(DmdUnit)-2))-3)