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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
vinod2086
Creator II
Creator II

appending values to id

Hi all

I have ID column in that column when Id beginnings with 9 then i need to append 0 , remaining IDs i dont want to change

ID

3456

9123

9876

3456

8765

345

98776

i have applied condition if ( not IsNull( ID),'0'&ID) it appending all values

1 Solution

Accepted Solutions
vinod2086
Creator II
Creator II
Author

Hi

instead of using like i have used match function its working fine

if(WildMatch(ID,'9*'),'0'&ID,ID)

View solution in original post

8 Replies
awhitfield
Partner - Champion
Partner - Champion

HI Vinod,

that may be easier to do in the load script, are you trying to add to ) to the start or end of the ID?

Andy

anbu1984
Master III
Master III

T1:
Load If(ID like '9*', '0'&ID,ID) As ID Inline [
ID
3456
9123
9876
3456
8765
345
98776
]
;

jsanchezh
Partner - Creator
Partner - Creator

Try with the left function:

     if(left(ID,1)='9', '0'&ID, ID)     as ID

jagan
Partner - Champion III
Partner - Champion III

HI,

Try like this

LOAD

*,

If(Left(ID,1)='9', '0' & ID, ID)  as New_ID

FROM DataSource;

Hope this helps you.

Regards,

Jagan.

amit_saini
Master III
Master III

Vinod,

Try this in calculated expression:

=if(Left(PLANT, 1) = '9', '0'&PLANT, PLANT)

Thanks,

AS

vinod2086
Creator II
Creator II
Author

Hi

instead of using like i have used match function its working fine

if(WildMatch(ID,'9*'),'0'&ID,ID)

Not applicable

this one works

if(WildMatch(ID,'9*'),'0'&ID,ID)

jagan
Partner - Champion III
Partner - Champion III

Hi,

You can also achieve the same by using Left() like below

If(Left(ID,1)='9', '0' & ID, ID)  as New_ID


Regards,

Jagan.