For solving such tasks the best way is using a matrix, especially if you want to cross all with all.
The script will be:
LOAD * Inline
[ID, Product, Sold quantity
001, Product1, 1
001, Product2, 5
001, Product3, 1
002, Product1, 1
002, Product3, 2
003, Product1, 1
003, Product3, 4
003, Product5, 2
LOAD ID, Product as Product2,[Sold quantity] as [Sold quantity2] Resident temp;
After that you can create a matrix:
And of course you can change an expression with output string by your taste.
P.S.: If you find my solution helpful or correct, please, close the thread (Qlik Community Tip: Marking Replies as Correct or Helpful). !
instance60_product_sales.qvw 153.0 K