Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
hibhardwaj
Contributor III
Contributor III

Special Select

Hello, 

I have an interesting scenario that I am trying to find a solution to. Maybe it is already been discussed, but I did not find it and so posting here. 

Scenario: In the database I have this table of what SKUs are consisted in what Box: 

Box SKU
A1, 2, 3
2, 3, 4
C3, 4, 5
D

6, 7, 8

Outcome: I should be able to show different Boxes based on my SKU selection.

SKU SelectionExpected Result
1A
3A, B, C
1, 2A, B
6, 7, 8D

 

Basically I am looking for a way to select a SKU to show all the combinations of that SKU (Tough to put it in words for me). Hopefully I am explaining that in the example above little more clearly 😛 

Appreciate your time. 

Thanks,
~Himanhsu 

@Miguel

Labels (3)
4 Replies
rubenmarin

Hi, maybe loading each Box and SKU combination in a difffernt row, so you can selct any value you want and keep the relations of those values.

This can be done with Subfield without 3rd parameter:

LOAD Box,
  Subfield(SKU, ',') as SKU
From/Resident...

For the expected result you can use concat:

Concat(Distinct Box)
hibhardwaj
Contributor III
Contributor III
Author

Thanks for your reply. But the question is- which I should have mentioned in the original post- I am trying to avoid to run the query wide open for ALL the Boxes. There may be other BOXes in the database that may have SKUs 12, 13, 14, 15, etc. I am trying to exclude such BOXes that dont contain a single SKU that is needed for analysis. 

Let me know if I am not making sense 😞 

~Himanshu

YJ_SG
Contributor III
Contributor III

Can try rebuild table as following

Box, SKU

A,1

A,2

A,3

B,2

B,3

B,4 ........

Choose 1, show A. Choose 2, show A,B

 

rubenmarin

Hi, I don't have a clear undertanding of what is needed. You are already retrieving all the data you need? Or you want some way to filter the querys to database?