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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create a field out of 3 other fields

Hi everyone

I have 3 fields as below

Raw_Data:

Load

formTitle,

litTitle,

Material_Name

FROM
Transactions.QVD (
qvd);


I wish to create an additional field out of those 3 fields called Online_Activity so i can select between formTitle, litTitle and Material_Name....but i want those fields to be named 'Formulations', 'Literature' and 'Samples' as values in the Online_Activity field.

I have tried for hours and hours to get this right but i keep getting synthetic joins when i try and create a seperate table!

I'm sure this will be very simple for someone with more experience!

Thanks in advance

Danny

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Danny,

Let me know if this concept script is right:

RawData:
LOAD RowNo() AS Dummy,
Rand() AS formTitle,
Rand() AS litTitle,
Rand() AS Material_Name
AUTOGENERATE 10;

Parsed:
CROSSTABLE (Online_Acitivity, Values)
LOAD Dummy,
formTitle AS "Formulation Downloads",
litTitle AS "Literature Requests",
Material_Name AS "Sample Requests"
RESIDENT RawData;

DROP FIELD Dummy;
DROP TABLE RawData;

Data is obviously bogus.

Miguel

View solution in original post

6 Replies
awhitfield
Partner - Champion
Partner - Champion

Hi Danny,

not exactly sure what you are after! Do you mean you something like:

Raw_Data:

Load

formTitle,

litTitle,

Material_Name,

fromTitle AS Formulations

litTitle AS Literature,

Material_Name AS 'Samples'

FROM
Transactions.QVD (
qvd);

Andy

richard_chilvers
Specialist
Specialist

Andrew's idea would do the 'renaming' of the 3 fields.

In addition, you could create a search object and include all 3 renamed fields in the parameters. That way, a user could search for a value within all 3 fields, and make a selection that way.

If you're never going to use the old fieldnames, you can DROP FIELD .... to neaten things up.

Regards

Not applicable
Author

Hi Andrew

What i want to create is a brand new field name with the existing fields as values, only with a new name:

QlikImg.PNG

formTitle becomes Formulation Downloads

litTitle becomes Literature Requests

Material_name becomes Sample Requests

I hope this makes it clearer.

Thanks Andrew

Danny

Miguel_Angel_Baeyens

Danny,

Let me know if this concept script is right:

RawData:
LOAD RowNo() AS Dummy,
Rand() AS formTitle,
Rand() AS litTitle,
Rand() AS Material_Name
AUTOGENERATE 10;

Parsed:
CROSSTABLE (Online_Acitivity, Values)
LOAD Dummy,
formTitle AS "Formulation Downloads",
litTitle AS "Literature Requests",
Material_Name AS "Sample Requests"
RESIDENT RawData;

DROP FIELD Dummy;
DROP TABLE RawData;

Data is obviously bogus.

Miguel

richard_chilvers
Specialist
Specialist

Danny

If you follow my suggestion of a search object, you will get just that.

It looks a little different but when you search the results will be listed in the 3 categories you want.

Regards

Not applicable
Author

Miguel this is exactly what i was looking for! Thank you.

For some reason the forum will not let me mark this as the correct answer. As soon as i can do so i will.

Thanks again!

Danny