Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Qlikers,
As a beginner, I am stuck here where I need something like described as below in two tables: Where in table "What I have" which is how data is available and loaded into the table but instead of this, I want to convert it into column fields based on the common key which will remain the same in any situation.
What I have | ||
Key | product | count |
6 | Air | 1 |
48 | Air | 1 |
2 | Air | 0 |
4 | Air | 1 |
9 | Air | 0 |
6 | Hotel | 0 |
48 | Hotel | 1 |
2 | Hotel | 1 |
4 | Hotel | 0 |
9 | Hotel | 1 |
6 | Car | 0 |
48 | Car | 0 |
2 | Car | 0 |
4 | Car | 1 |
9 | Car | 0 |
What I need | ||||
Key | Air | Hotel | Car | Total |
6 | 1 | 0 | 0 | 1 |
48 | 1 | 1 | 0 | 2 |
2 | 0 | 1 | 0 | 1 |
4 | 1 | 0 | 1 | 2 |
9 | 0 | 1 | 0 | 1 |
I appreciate all the helpers.
try:
HI,
Take a look at the crosstable function in script.
Dear Mark,
Thank you for sharing this link, but I need vice versa results exactly the same shown in given examples above.
try:
Much appreciated, Dear Elvis. This is exactly what I need. Thank you.