Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
geam1988
Creator
Creator

suppress or ignor extra 0

Hi,  i am using MAKT.MATNR for material number.

material number are like this

Want to show like this

0000000081254

81254

from this type of number i want to remove extra 0 from left side
and just want to show the value like this (81254)

0000000105857

105857

0000000105860

105860

856958

856958

MV00004586

MV00004586

MCDGGXT

MCDGGXT

1 Solution

Accepted Solutions
sunny_talwar

Sample script

Table:

LOAD Replace(LTrim(Replace(MAKT.MATNR, '0', ' ')), ' ', '0') as MAKT.MATNR;

LOAD * INLINE [

    MAKT.MATNR

    0000000081254

    0000000105857

    0000000105860

    856958

    MV00004586

    MCDGGXT

];

Capture.JPG

or you can do this on the front end by just using this as a calculated dimension.

Replace(LTrim(Replace(MAKT.MATNR, '0', ' ')), ' ', '0')

View solution in original post

2 Replies
sunny_talwar

Try this

Replace(LTrim(Replace(MAKT.MATNR, '0', ' ')), ' ', '0')

sunny_talwar

Sample script

Table:

LOAD Replace(LTrim(Replace(MAKT.MATNR, '0', ' ')), ' ', '0') as MAKT.MATNR;

LOAD * INLINE [

    MAKT.MATNR

    0000000081254

    0000000105857

    0000000105860

    856958

    MV00004586

    MCDGGXT

];

Capture.JPG

or you can do this on the front end by just using this as a calculated dimension.

Replace(LTrim(Replace(MAKT.MATNR, '0', ' ')), ' ', '0')