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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
beck_bakytbek
Master
Master

Two Fields into one Field as Filter

Hi Folks,

i have an situation which does look like, our customer deleloped the database, within this database we have a tables with 3 fields:

Project,   Project_Manager1,    Project_Manager2

A,               Mike,                     Simon

B,               Tom,                      Frank

C                Yoko                        Will

i know this database does look like a bit funny, but as you know : Your Customer is your King

i have a question: How can i combine these Fields: Project_Manager1, Project_Manager2 into one Field: ProjectManger

my expected Output is:


Project    and Filter as ProjectManager

A               Mike

               Simon

B               Tom

               Frank

C               Yoko

                Will

thanks a lot

Beck

13 Replies
OmarBenSalem

It would do it automatically Beck :

In fact :

let's imagine I have this now:

table:

Crosstable (OptionField, ProjectManager) LOAD * INLINE [

Project,   Project_Manager1,    Project_Manager2 , Project_Manager3 , Proj Manager 4 , Projman

A,               Mike,                     Simon , Omar , Omar , Omar

B,               Tom,                      Frank , Omar , Omar , Omar

C ,               Yoko  ,                      Will , Omar , Omar , Omar

];

drop Field OptionField from table;

Result:

Capture.PNG

beck_bakytbek
Master
Master
Author

Omar, i mean this situation,

table1:

load * inline [

Project, ProjectManager

A, Takeshi

B,  James

D, Kate

](delimiter is ',');

table:

Crosstable (OptionField, ProjectManager) LOAD * INLINE [

Project,   Project_Manager1,    Project_Manager2

A,               Mike,                   Simon

B,               Tom,                    Frank

C ,              Yoko  ,                 Will

];

drop Field OptionField from table

what do you thin about it?

Thank a lot

Beck

OmarBenSalem

if u keep like this, it will create a synthetic key, but u'll have the right information; to eliminate the synthetic key, proceed as follow:

table1:

load * inline [

Project, ProjectManager

A, Takeshi

B,  James

D, Kate

](delimiter is ',');

 

table:

Crosstable (OptionField, ProjectManager) LOAD * INLINE [

Project,   Project_Manager1,    Project_Manager2

A,               Mike,                   Simon

B,               Tom,                    Frank

C ,              Yoko  ,                 Will

];

drop Field OptionField from table;

Final:

NoConcatenate

Load * Resident table;

Concatenate

load * Resident table1;

Drop Tables table,table1;

Exit Script;

result:

Capture.PNG

beck_bakytbek
Master
Master
Author

Thanks a lot Omar