I'm not sure how to explain what I'm trying to do, but I'll do my best! I have a dataset for business leads (I can't share as internal only, but I can create a mock dataset if helpful), some of these leads have a Marketing Channel column populated whereas some don't. What I want to do is find the percentage split of those that have a Marketing Channel populated and split them by Lead_Source column (which is populated for all), and then populate the leads that don't have Marketing Channels with the percentage split. I've created the table for the percentage splits, for example:
Lead_Source | channelGrouping | Row Count | Lead Total | % Split |
Call | Direct | 30 | 100 | 0.3 |
Call | Paid Search | 10 | 100 | 0.1 |
Call | 60 | 100 | 0.6 | |
Web | Paid Social | 25 | 50 | 0.5 |
Web | Events | 25 | 50 | 0.5 |
So from this table, in the dataset where there is no channelGrouping and the Lead_Source is "Call", I want to assign 30% of those records as the "Direct" channelGrouping, 10% as "Paid Search" and 60% as Email.
The other table I've created just has the Lead_Source and the count. For example:
Lead_Source | Count |
Call | 200 |
Web | 500 |
So of the 200 'Call' records without a channelGrouping, we assign 60 (30%) of the records with "Direct", 20 (10%) with "Paid Search" etc.
Does anyone know how I could achieve this?
Hi @willd9
Can you provide us the output from you example for your better understanding?
Thanks,
Kamen
User | Count |
---|---|
61 | |
24 | |
23 | |
21 | |
20 |