Hi all,
I have a basic logic question.
I have a column with customer names (many of which are duplicates multiple times over because of unique visits) and another with a 'yes' or 'no' flag for whether an item was bought.
What would be the best way to capture if at least one of those duplicate names also has a 'yes' flag for bought a item?
Thanks ahead!
First
LODs are just a way to create a new layer in the data set - if you think of the data set as a pyramid - the data you load is the base of the pyramid - the top of the pyramid is the total of all the data in the data set
when you create an lod it results in a new virtual layer in the data that can be used in any form of calculation
so in your case purchase indicator by date = {Fixed (customer), (Date) : sum( if [purchased item]="Y" then 1 else 0 end )} in words it says for each combination of customer and date if the customer purchased something the 1 if not 0 - so far not so cool
next you want to determine a % that they bought v there total visits customer level % purchases {fixed [customer] : sum([purchast idicator]) / count([date])}
or overall = {fixed : sum([purchast idicator]) / count([date])}
or you can put them together as
if size()=1 then sum([overall % purchases]) else sum([overall % purchases customer level)]) end
and you can see whichever level you want to see
Jim
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.