Forum Discussion
TopHat
4 years agoFrequent Visitor
List string values in a matrix depending on different permutation
Hi all Screenshot of the sample source data: Sanitised sample data in usable format: UserID Day DiscountedHandset FreeTrariff Phone HasOrdered Quantity Sale 1 1 Y Y Samsu...
lbendlin
4 years agoSuper User
Please provide sanitized sample data in usable format. A screenshot is not a usable format.
TopHat
4 years agoFrequent Visitor
I see what you mean.
I have updated the output now hope that's better.
- lbendlin4 years agoSuper User
Nearly there. Now please do the same for the source data.
- TopHat4 years agoFrequent Visitor
Okay done that too now 😊
- lbendlin4 years agoSuper User
See attached for one possible solution. Note that your data model is (mostly) accurate but rather useless for the question you are trying to answer. Instead you need to use tons of disconnected tables and crossjoins. Might get away with using TREATAS or CROSSJOIN(,,none) - which might be necessary if you want this to scale for larger date ranges.