Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
chaudharic3333
Contributor
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
Creator III
Creator III

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
Master III
Master III

May be Use Dual to create your field 

Dual('A0000756',76)