Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have two tables of the following configuration:
Table1:
Key1, Dim1, Dim2, Dim3, Key2, Dim4, Dim5, Dim6
123 , A , B , C , 345 , D , E , F
678 , G , H , I , 912 , J , K , L
Table2:
Key1, Key2, Dim7
123 , - , AA
- , 345 , BB
678 , - , CC
- , 912 , DD
If 123 is selected in Table1 Table 2 should show the first and second row. The same if 345 is selected.
Is there any way to do this through mapping?
Kind Regards
Daniel
that should be naturally happening without the need to do anything
can you post a better sample with a bit more clarity on what you are trying to achieve?
Hello, Daniel!
Try to separate Table2 by two different tables. One will contain a Key1 and the second will contain Key2. The Table1 will be main, so when you select a 123 in Key1 field it will show you result as two rows 123-AA (Table2 with Key1) and 345-BB (Table3 with Key2).
Hi Sergin
Thank you for the reply. Unfortunately all the data in Dim7 needs to be in the same column. It contains GeoData which I want to use in a QlikMaps plugin.
Any other ideas?
Kind Regards
Daniel
Yes. But the the condition
If 123 is selected in Table1 Table 2 should show the first and second row. The same if 345 is selected.
won't be fulfilled.
Kind Regards
Daniel
is this exactly how your source data is or are you creating any of these tables yourself?
try below
Table1:
load * Inline [
Key1, Dim1, Dim2, Dim3, Key2, Dim4, Dim5, Dim6
123 , A , B , C , 345 , D , E , F
678 , G , H , I , 912 , J , K , L
];
temp:
load RecNo() as Rowkey,Key1,if(len(Key1)<2,Peek(Key1),Key1) as KeyA,
Key2,
Dim7
inline [
Key1, Key2, Dim7
123,, AA
,345, BB
678,,CC
,912,DD
];
NoConcatenate
LOAD
Rowkey,
KeyA as Key1
,KeyB as Key2
,Dim7;
LOAD
Rowkey,
KeyA,
Key2,
if(len(Key2)<2,peek(Key2),Key2) as KeyB,
Dim7
RESIDENT temp
Order by Rowkey DESC;
DROP table temp;
I solved it utilizing another key. Thanks for all the answers anyway.
Kind Regards
Daniel