Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Suxel
Contributor III
Contributor III

Filter pane and straight table value

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.

Suxel_0-1670329515505.png

However, when I add another selection into the modified list (eg, Hong Kong), some ProjectID are duplicate (eg. 'Pon)' and 'Qion').

Suxel_1-1670329751352.png

In this case, how do I get rid of the duplicate ProjectID when multiple values are selected in Modified Branch list?

 

Labels (2)
1 Solution

Accepted Solutions
Suxel
Contributor III
Contributor III
Author

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;

 

Sheet ViewSheet ViewData Model ViewerData Model Viewer

View solution in original post

1 Reply
Suxel
Contributor III
Contributor III
Author

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;

 

Sheet ViewSheet ViewData Model ViewerData Model Viewer