Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

chaudharic3333
New Contributor

How to autogenerate Alpha-Numeric string

Hi,

I have a simple problem with a complex solution.

I have a field called Codes and it is in an alphanumeric format.

For example. A0000756

Each code has a value associated with it called Value.

For example: A0000756

Value = 76

Now someone has consolidated a range of Codes together.

For example: A0000756-A0000852

I want to split this range in the load editor individually and divide the sum of Value by the count (which is 852-756=96) .

A0000756

A0000757

A0000758

A0000759

.....

A0000852

Any suggestion will help

2 Replies
ychaitanya
Contributor III

Re: How to autogenerate Alpha-Numeric string

If i undsertood your requirement , is this what you;'re looking for

CVV:

Load if(index(Code,'-'),subfield(Code,'-',2)-subfield(Code,'-',1),Value)as Value,

CVV as Code;

Load PurgeChar(CVV,'ABCDEFGHIJKLMNOPQRSTUVWXYZ') as Code,Value,CVV;

Load * INLINE

[CVV,Value

A0000756,76

A0000757,77

A0000758,78

A0000759,79

A0000756-A0000852

];

Thanks

CY

sasiparupudi1
Honored Contributor III

Re: How to autogenerate Alpha-Numeric string

May be Use Dual to create your field 

Dual('A0000756',76)

Community Browser