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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

replace

how to replace the '<=x<' symbol with '-' function using replace function?

1 Solution

Accepted Solutions
Colin-Albert
Partner - Champion
Partner - Champion

Try this

new:

LOAD Region,

     Year,

     Products,

     Sales,

     replace ( class(Sales,30) ,'<=x<' ,'-') as Salesrange

FROM

(biff, embedded labels, table is Sheet1$);

View solution in original post

15 Replies
SunilChauhan
Champion II
Champion II

Replace(fieldName,'<=x<' ,'')

hope this helps

Sunil Chauhan
Kushal_Chawda

try like this

Replace('<=x<abcd','<=x<','-')

Not applicable
Author

new:

LOAD Region,

     Year,

     Products,

     Sales,

     class

     ([Sales],30) as Salesrange

   

     

FROM

(biff, embedded labels, table is Sheet1$);

A:

    LOAD * ,  Replace(Salesrange,'<=x<' ,'-')

     

      Resident new;

     

      DROP Table new;

here replace function is not working y??

Colin-Albert
Partner - Champion
Partner - Champion

Try this

new:

LOAD Region,

     Year,

     Products,

     Sales,

     replace ( class(Sales,30) ,'<=x<' ,'-') as Salesrange

FROM

(biff, embedded labels, table is Sheet1$);

anbu1984
Master III
Master III

Check if you have spaces in between string '<=x<' in your input


Can you provide sample data for which replace didn't work

Not applicable
Author

Hi siva,

try this

new:

LOAD Region,

     Year,

     Products,

     Sales,

     class

     ([Sales],30) as Salesrange

  

    

FROM

(biff, embedded labels, table is Sheet1$);

A:

    LOAD * ,  Replace(Salesrange,'<=x<' ,'-') as Sales_Range

    

      Resident new;

    

      DROP Table new;

or

A:

    LOAD * ,  Replace( ([Sales],30),'<=x<' ,'-') as Sales_Range

    

      Resident new;

Not applicable
Author

hey, siva prasad

it's very simple.

replace(fieldname,'<=x<','-') as fieldname

cheers,

kunal bhattacharjee

SunilChauhan
Champion II
Champion II

Replace(trim(Salesrange),'<=x<' ,'-') as yourfieldname

Sunil Chauhan
SunilChauhan
Champion II
Champion II

or try to copy <=x< from you Salesrange in replace above

hope this helps

Sunil Chauhan