Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
Before Avoid zeros in My dimension.
can you resole ASAP..
000000000000001613 |
000000000000001614 |
000000000000001615 |
000000000000001616 |
000000000000001617 |
000000000000001618 |
000000000000001619 |
000000000000001620 |
000000000000001621 |
000000000000001622 |
000000000000001623 |
000000000000001624 |
000000000000001625 |
000000000000001626 |
000000000000001627 |
000000000000001628 |
000000000000001629 |
Thanks
Reddy
Hi Munna,
I loaded your data with leading zeros into QV and found this solution:
LOAD RawData,
replace(ltrim(replace(RawData,'0',' ')),' ','0') as NumData
FROM
[http://community.qlik.com/thread/110099]
This expression in a first step replaces all zeros with spaces, then the ltrim function eleminates all leading zeros. At last zeros which have been replaced in the relevant number with spaces, too are again switched to zeros.
Hope this helps
Burkhard
if it is always 4 digits then right(YourField, 4) would do it.
Or num# function to make it appear as number, eliminating leading zero's
Munna,
I would use the functions
rangemin() to get a minimum between two data (we are not sure it will always begin with 0)
mid() to extract part of a string
findoneof() to know where to find one letter in a string
Please try this (I did not test myself):
mid(MyField, rangemin(findoneof(MyField, '123456789'), 1)) as MyField
Fabrice
You could try:
num(FIELD) or
num(num#(Field))
Hope this helps!
Findoneof() is a good option.
Right(<Field Name>, Len(<Field Name>) - FindOneOf(<Field Name>,'123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ`~!@#$%^&*()-=_+[]{}\|;:,.<>/?')+1)
SC.
SUPPOSE THIS DATA COMES UNDER FIELDAME COLOUMN. THEN USE FOLLOWS
MID(FIELDNAME,FINDONEOF(FIELDNAME,'123456789'),lEN(FIELDNAME)-1)
HOPE THIS HELPS
Here is the simple one:
num(num#(replace(NumberExpression,'00000','')),'0000')
for some reason Num# doesn't work directly with this data.
Easiest I can think of:
Its its in number format:
num(Field,'0')
In String format:
num(num#(Field),'0')
Thanks
AJ
Hi Fabrice,
It's not working can you do another solution it would be great help full....
Thanks& Advance
Munna
My Dear Friend,
I tried but,It's not working can you do another solution it would be great help full....
Thanks& Advance
Munna