Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Community,
I have 2 tables
Table1:
| ID | A | B | C | Target |
| 1 | A1 | B1 | C1 | Yes |
| 2 | A1 | B1 | C1 | No |
| 3 | A1 | B1 | C1 | Yes |
| 4 | A1 | B2 | C1 | No |
| 5 | A1 | B2 | C1 | Yes |
| 6 | A2 | B2 | C2 | Yes |
| 7 | A2 | B2 | C2 | Yes |
| 8 | A2 | B2 | C2 | No |
| 9 | A2 | B3 | C2 | No |
| 10 | A2 | B3 | C3 | No |
| 11 | A2 | B3 | C3 | No |
| 12 | A2 | B3 | C3 | Yes |
| 13 | A3 | B3 | C4 | No |
| 14 | A3 | B4 | C4 | Yes |
| 15 | A3 | B4 | C4 | Yes |
Table2:
| Col1 | Col2 |
| A | 10 |
| B | 9 |
| C | 8 |
The columns in table 1 are rows in my table2. Each row in table 2 has some score to say whether its important to consider or not.
The output table should be like below
Output table:
| Col1 | Col2 | Target | Count(Taget) |
| A | A1 | Yes | |
| No | |||
| A2 | Yes | ||
| No | |||
| A3 | Yes | ||
| No | |||
| B | B1 | Yes | |
| No | |||
| B2 | Yes | ||
| No | |||
| B3 | Yes | ||
| No | |||
| B4 | Yes | ||
| No | |||
| C | C1 | Yes | |
| No | |||
| C2 | Yes | ||
| No | |||
| C3 | Yes | ||
| No | |||
| C4 | Yes | ||
| No |
I appreciate your help.
Thanks,
Manideep
Hello!
PFA.
You can use this script for solving this task:
CrossTable(Col1,Col2)
t:
LOAD ID,
A
,B
,C
//,Target
FROM
[https://community.qlik.com/thread/263606]
(html, codepage is 1251, embedded labels, table is @1);
CrossTable(Col3,Col2)
LOAD
Target
,A
,B
,C
FROM
[https://community.qlik.com/thread/263606]
(html, codepage is 1251, embedded labels, table is @1);
Left Join(t)
sorting:
LOAD Col1,
Col2 as SortLVL
FROM
[https://community.qlik.com/thread/263606]
(html, codepage is 1251, embedded labels, table is @2);
The result will be:
