Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! 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

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
Champion

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

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
Champion

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

Sunil Chauhan
SunilChauhan
Champion
Champion

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

hope this helps

Sunil Chauhan