Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview script function to remove leading spaces at the end

Hi,

I want to know to how to remove the spaces at the end of the string.

Eg: the qlikview is a learning tool. 

Qlikview is analytics tool.          

The length of the string varies and the spaces of the string varies to each string.. For eg.. The string 1 contains 5 leading spaces at the end..

The 2nd string contains 10 leading spaces at the end..I can't use replace function for removing because it will remove all the spaces including the spaces in between the string...

Can u please provide solution for the issue..

Message was edited by: vinu priya

30 Replies
Chanty4u
MVP
MVP

i think Typo mistake

?

did u chked the letters of ur field name

Chanty4u
MVP
MVP

i think Typo mistake

?

did u chked the letters of ur field name

avinashelite

could you please share the sample data

Not applicable
Author

Here some data

  

   MaterialMaterial Desc                          
   600007 RES SEPHAROSE FAST FLOW              
   600008 RES EPHAROSE FAST FLOW             
   600008 RES SP SEPHAROSE FAST FLOW             
   600009 RES MACR-PRP DRXYPTTE TYPE II80UM
   600015 CHM 95% ETHYL 190 PROOF    
   600017 CHM MES MONOHYDRATE FREE ACID CRYSTLLINE
   600017 CHM MES MONOHYDRATE FREE ACID CRYSTLLINE
Not applicable
Author

Spaces occurs both at the beginning and end of both material and material description

Not applicable
Author

Hi Avinash,

With my own sample data I am able to achieve the trim function. But I'm not able to do the same with the excel data in the original datasource from excel.

I think there is some problem with the data - Can you please help me out.

Chanty4u
MVP
MVP

u can create a  maping table and use[ mapsubsring ]funcion

Not applicable
Author

Can you please elaborate about it. How to do the mapping function

MayilVahanan

Hi

Try like this

Trim(Material) &' - '& Trim([Material Desc]) As MaterialWithDesc

Give one space befr and after "-"

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
MayilVahanan

Hi

Is it possible to post your sample excel file for more analysis?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.