Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

ssriramin19
New Contributor II

restricting the values

Hello,

   My question is that I have a field called corp_grp_code which has the values as 0000000002  and 0000000001.But my requirement is that instead of full digists only single digit 1 and 2 should need to be displayed.

Can anyone help me on this .

Thanks

Sriram


1 Solution

Accepted Solutions
Not applicable

Re: restricting the values

Which range of values would have that field? Based on your informations I sugest you two solutions:

LOAD NUM(corp_grp_code) AS corp_grp_code_new

RESIDENT Table;

This one is for 1 digit value range field:

LOAD right(corp_grp_code,1) as corp_grp_code_new

RESIDENT Table;



Could you be more specific on the exact problem?



6 Replies
MVP
MVP

Re: restricting the values

Use Num() function

vivek_niti
Contributor

Re: restricting the values

Hi,

Use the Num() function on corp_grp_code. That will remove the leading zeros.

Thanxs,

Vivek

Not applicable

Re: restricting the values

Which range of values would have that field? Based on your informations I sugest you two solutions:

LOAD NUM(corp_grp_code) AS corp_grp_code_new

RESIDENT Table;

This one is for 1 digit value range field:

LOAD right(corp_grp_code,1) as corp_grp_code_new

RESIDENT Table;



Could you be more specific on the exact problem?



Re: restricting the values

Hi,

If the value is in text format then u could use below

=Num(Num#(FieldName, '#'))

if not simply use Num()

Not applicable

Re: restricting the values

Use the Num() Function. It will help you achieve your target.

Not applicable

Re: restricting the values

Hi,

Num() is just a format function.

If you want to store your data without zeros, use LTrim(corp_grp_code)*1 in your load script.