Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to replace all fileds with their corresponding keys

I have these two tables:

Table1:

1.png

Table2:

2.png

I want to replace all of the YearEvents and YearEventKey_Grouping with their corresponding key... so for example replace all 2009 WTS with a 1. all 2011 WTS with a 2... etc.

Thanks!

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

I'm not sure I understand your problem exactly, but if you want to make the YearEventKey_Grouping go from

2009 Submission-2010 Submission to 12-13, then this is how you can do it.

YearEventIDMap:

mapping load

YearEvent,

id

From Table2; //If this table is in memory, then you should use Resident Table2; in stead of From.

Table1:

load

mapsubstring('YearEventIDMap',YearEventKey_Grouping) as YearEventKey_Grouping,

Volume,

ProductA,

ProductB

From Table1; //need to replace this line with the source for table 1.

Hope this helps


Regards
SKG

View solution in original post

2 Replies
Highlighted
Partner
Partner

I'm not sure I understand your problem exactly, but if you want to make the YearEventKey_Grouping go from

2009 Submission-2010 Submission to 12-13, then this is how you can do it.

YearEventIDMap:

mapping load

YearEvent,

id

From Table2; //If this table is in memory, then you should use Resident Table2; in stead of From.

Table1:

load

mapsubstring('YearEventIDMap',YearEventKey_Grouping) as YearEventKey_Grouping,

Volume,

ProductA,

ProductB

From Table1; //need to replace this line with the source for table 1.

Hope this helps


Regards
SKG

View solution in original post

Highlighted
Not applicable

Perfect. Thank you