Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have this:
Customer | Product X | Product Y | Product Z |
---|---|---|---|
123 | 0 | 1 | 1 |
456 | 1 | 0 | 0 |
789 | 1 | 1 | 1 |
I want this?
Customer | Product |
---|---|
123 | Y |
123 | Z |
456 | X |
789 | X |
789 | Y |
789 | Z |
Can you help me?
Regards,
Arjan
Hello,
Please try the following:
CrossTable(Product, Data, 2)
LOAD Customer,
[Product X],
[Product Y],
[Product Z]
FROM
Data.xlsx
(ooxml, embedded labels, table is Sheet1);
Temp:
CrossTable(Product, Value)
LOAD * INLINE [
Customer, Product X, Product Y, Product Z
123, 0, 1, 1
456, 1, 0, 0
789, 1, 1, 1
];
Result:
Load Customer, replace(Product,'Product ','') as Product
Resident Temp
where Value=1;
drop table Temp;
Hello,
Please try the following:
CrossTable(Product, Data, 2)
LOAD Customer,
[Product X],
[Product Y],
[Product Z]
FROM
Data.xlsx
(ooxml, embedded labels, table is Sheet1);