We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Iteration of a row based on a condition-based count

willd9
7 - Meteor

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_SourcechannelGroupingRow CountLead Total% Split
CallDirect301000.3
CallPaid Search101000.1
CallEmail601000.6
WebPaid Social25500.5
WebEvents25500.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_SourceCount
Call200
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? 

2 REPLIES 2
KamenRider
11 - Bolide

Hi @willd9 

 

Can you provide us the output from you example for your better understanding?

 

Thanks,

Kamen

willd9
7 - Meteor

I've attached an example of the final expected output from the example explained

Labels
Top Solution Authors