Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Hope everyone is having a good day.
I have the following table:
Brand | Giftcard1 | Giftcard2 | Giftcard3 | Giftcard4 | Giftcard5 | Giftcard6 | Giftcard7 | Giftcard8 | Giftcard9 | Giftcard10 | Giftcard11 | Giftcard12 | Giftcard13 | Giftcard14 | Giftcard15 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Nike | 123 | 456 | 789 | 1212 | 23234 | 233234 | 2332 | 232 | 567 | 23467 | 35656 | 578 | 98965 | 683 | 2456 |
For example, I have chosen on 15 giftcard colums. I have more than 300 in the real data.
on my Qlik application, I would like to show list of all gift cards. Is there any way to achieve it?
Best
Parth
Hi Parth,
I suggest to use crosstable function in the script.
TableName:
CrossTable(GiftCardNum, GiftCardValue)
LOAD
Brand,
GiftCardNum,
GiftCardValue
From Source;
So you fan have an input like this:
Brand GiftCardNum GiftCardValue
Nike Giftcard1 123
Nike Giftcard2 456
and so on.
Hope that helps.
Carlos M
What output is it you want exactly? Should be do-able!
Just a string with them all in?
Hi Parth,
I suggest to use crosstable function in the script.
TableName:
CrossTable(GiftCardNum, GiftCardValue)
LOAD
Brand,
GiftCardNum,
GiftCardValue
From Source;
So you fan have an input like this:
Brand GiftCardNum GiftCardValue
Nike Giftcard1 123
Nike Giftcard2 456
and so on.
Hope that helps.
Carlos M
Expanding on Carlos' answer, if you use LOAD * then it doesn't matter how many columns you have in your data, providing of course you just have the one leading column
Fact:
CrossTable(Giftcard1, Number)
LOAD *
FROM
[https://community.qlik.com/thread/253264]
(html, codepage is 1252, embedded labels, table is @1);
Thank you both. I appreciate your help.
Best
Parth