Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Short names for values in a column

Hi All,

One column having too lengthy values(Not all values some values). i need to create short names for that. pls help me.

Regards,

Krishna

8 Replies
Anonymous
Not applicable
Author

You could use the Left() function to create short names of only the first few dozen characters of the lengthy names you have.

Anonymous
Not applicable
Author

Hi Bill

pls explain in detail.

Regards,

Krishna

Anonymous
Not applicable
Author

Not really much detail to explain.  Put the below in a text box and you'll see it shows the first 2 dozen characters of the string:

     =Left('The quick brown fox jumps over the lazy dog',24)

sunny_talwar

Not sure of what you are trying to do but if you want to keep first letter of each word, you can try something like this:


KeepChar(Capitalize(FieldName), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') aa NewFieldName

MarcoWedel

If those are predefined values, you could use a mapping table and Applymap() to substitute the long values with short versions.

regards

Marco

ashfaq_haseeb
Champion III
Champion III

Hi,

Map long name with meaningful shot names and you can use Apply Map later to convert.

Regards

ASHFAQ

its_anandrjs

Can you provide some sample file to have a look that is better to solve problem.

Regards

Anand

Kushal_Chawda

Try like below

In below map table you can define the long values from field. Make sure that values are case sensitive.

Map:

mapping Load * inline [

MapFrom, MapTo

This is too long Name , short Name ];

Data:

load *,

         mapsubstring('Map', YourFieldnameContainingLongValues) as NewField

From Table;