Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I am working on a table of transactions (sales). Every row referes to on product that has been bought. The person can buy many products. My goal is to have only one line for each person and add columns for the products that has been bought, knowing that a person can buy no more than 10 products.
I don't know how to make that table in Qlikview starting with an Excel file with a line per product bought.
Thank you.
You can do row to column transpose... Post a sample file.
Create an additional field in the script using the autonumber function:
Temp:
LOAD [Transaction ID], Product FROM ...source... ;
Result:
LOAD
[Transaction ID],
Product,
'Product ' & autonumber(RecNo(), [Transaction ID]) as ProductNo
RESIDENT Temp
ORDER BY [Transaction ID];
DROP TABLE Temp;
Create a pivot table with Transaction ID and ProductNo as dimensions and only(Product) as expression. Drag the ProductNo dimension to the right above the expression.
As a biginner in Qlikview, I didn't understand the part when I have to create a pivot table. I also didn't understand what is the meaning of this syntax.'Product ' & autonumber(RecNo(), [Transaction ID]) as ProductNo
thank you for your answer
You could of course just try it out to see what it does, but the line 'Product ' & autonumber(RecNo(), [Transaction ID]) as ProductNo will create the values 'Product 1', 'Product 2', ... etc for each product value it encounters per Transaction ID value.
A pivot table is a chart object that you create in the front end after loading the data into Qlikview. Chart objects are used to show data and results from calculations so users can see and interact with it.
Thank you very much.
I tried the expression you gave me but it only gave me a blank table with no columns
See attached example.
Hello, I do not see the attached example, can u please load it?