Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have applied with Subfield() script to change existing branch list which have multiple values into unique modified branch list. When select on the modified list (eg. Tokyo), the straight table result is correct which display whatever related to Tokyo.
However, when I add another selection into the modified list (eg, Hong Kong), some ProjectID are duplicate (eg. 'Pon)' and 'Qion').
In this case, how do I get rid of the duplicate ProjectID when multiple values are selected in Modified Branch list?
I have found the solution as below.
Data:
load
Trim(subfield(Branch_Chain,',',1)) as Branch_1,
Trim(subfield(Branch_Chain,',',2)) as Branch_2,
Trim(subfield(Branch_Chain,',',3)) as Branch_3,
rowNo() as Key,
* inline [
ProjectID | Branch_Chain
"FEFEX" | "Tokyo, Singapore, China"
"Imat" | "Tokyo, China"
"Pon)" | "Singapore, Hong Kong"
](delimiter is '|') ;
// Table list
Table1:
load
rowNo() as Key,
* inline [
ProjectID | Branch_Chain
"FEFEX" | "Tokyo, Singapore, China"
"Imat" | "Tokyo, China"
"Pon)" | "Singapore, Hong Kong"
](delimiter is '|') ;
// Filter list
Table2:
CrossTable (Branch_No, Branch,1)
load
Key,
Branch_1,
Branch_2,
Branch_3
resident Data;
Drop Table Data;
I have found the solution as below.
Data:
load
Trim(subfield(Branch_Chain,',',1)) as Branch_1,
Trim(subfield(Branch_Chain,',',2)) as Branch_2,
Trim(subfield(Branch_Chain,',',3)) as Branch_3,
rowNo() as Key,
* inline [
ProjectID | Branch_Chain
"FEFEX" | "Tokyo, Singapore, China"
"Imat" | "Tokyo, China"
"Pon)" | "Singapore, Hong Kong"
](delimiter is '|') ;
// Table list
Table1:
load
rowNo() as Key,
* inline [
ProjectID | Branch_Chain
"FEFEX" | "Tokyo, Singapore, China"
"Imat" | "Tokyo, China"
"Pon)" | "Singapore, Hong Kong"
](delimiter is '|') ;
// Filter list
Table2:
CrossTable (Branch_No, Branch,1)
load
Key,
Branch_1,
Branch_2,
Branch_3
resident Data;
Drop Table Data;