Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Zero Problems

Hi,

I have in my database a field that contains a 16 characters.

In table 1 real data it is 0000000032043988

In table 2 it is just 32043988 and stripped away all zeros in database.

In qlikview you can use Right(Field,8) to convert.

Can i use som function to strip all the zeros from table 1 instead?

Br

John

 

1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: Zero Problems

Only values with max. 15 digits are numbers in Qlik - if the values are processed in any way it are only 14 digits. This means your values couldn't be directly formatted in your wished way and also not be converted - the conversion worked only if it happens within their limits.

But you could use string-functions to remove the leading zero's, maybe something like this:

num(mid('0000000035257451', findoneof('0000000035257451', '123456789')))

- Marcus

View solution in original post

6 Replies
Highlighted
MVP
MVP

Re: Zero Problems

You can use num() to get rid of leading zeros. I.e. -

Num(0000000032043988) - gives  32043988

Highlighted
Creator III
Creator III

Re: Zero Problems

Hi, try that, it gives me nothing 😞

Num(TRTREF) as [Pick control number], give QlikView "-"
TRTREF as [Pick control number2], give QlikView "0000000032043988"

I think the field is text in DB

Highlighted
MVP
MVP

Re: Zero Problems

Are the quotes part of your data (you see in qv)? If so, you could try like:

Num(Keepchar(TRTREF, '0123456789'))  as [Pick control number]

Highlighted
Creator III
Creator III

Re: Zero Problems

Hi,

No, no quotes .

The data is : 0000000035257451 and it text i guess

Still doesn't work 

Highlighted
MVP & Luminary
MVP & Luminary

Re: Zero Problems

Only values with max. 15 digits are numbers in Qlik - if the values are processed in any way it are only 14 digits. This means your values couldn't be directly formatted in your wished way and also not be converted - the conversion worked only if it happens within their limits.

But you could use string-functions to remove the leading zero's, maybe something like this:

num(mid('0000000035257451', findoneof('0000000035257451', '123456789')))

- Marcus

View solution in original post

Highlighted
Creator III
Creator III

Re: Zero Problems

This works!

Thanx Man!

Br

John