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

General Discussions

Discuss any topics that are not product-specific here.
SOLVED

Separate Records for each Distinct Customer when rendering from Reporting

nafong
6 - Meteoroid

I've made a workflow that takes each individual customer through a filter and outputs a report associated to that person using Basic Table, Report Text, Layout, and Render. 

 

NameSpendCountScore
Adam$10015
Beatrice$030
Charlie$5051
Deli$1031

 

For example, when I filter out Adam into two separate tables, it would look like so rendered (Report 1):

 

Transactions

DescriptionTransactions

Name

Adam
Spend$100
Count1

 

Score

DescriptionScoring
NameAdam
Score5

 

 

Now I want to output all 4 customers at once, where each customer has its own record. But I'm unable to separate the entries so that all of Adam's transactions are outputted first in Record 1, and then Beatrice in Record 2 below all of Adam's data, and so on. It looks like this right now but I want each customer to have its own Record (Report 2):

 

Transactions

DescriptionTransactions
NameAdam
Spend$100
Count1
NameBeatrice
Spend$0
Count3
NameCharlie
Spend$50
Count5
NameDeli
Spend$10
Count3
Score

DescriptionScoring
NameAdam
Score5
NameBeatrice
Score0
NameCharlie
Score1
NameDeli
Score1

 

 

How can I change my workflow so that they are all separated when I render after Layout like Report 1 but each different customer appearing after all of the previous one's data is outputted? 

 

 

Thanks :)

2 REPLIES 2
OTrieger
14 - Magnetar

@nafong 

The good thing is that you build the WF that do the job, what is missing here is a batch macro, so just copy the whole WF to another Canvas and then Convert the Input data tool to a Macro Input tool. Now embed the person name in the file name or as a sheet name, so Alteryx will create or separate file for each name or will create a new tab for each name.
Add a Filter tool just after the Macro input Tool and connect the Control Parameter tool to the Filter Tool Q to Q
Set the Formula [Name]=[1]

And save

Now go back to the original WF, delete everything except the Data input tool.

Click on Insert>Macro

Connect this tool one time to the Control Parameter anchor and to the data anchor.

Click on the macro and select in Questions [Name]

Now you WF will work in the Batch macro each time processing one name at a time

 

KGT
13 - Pulsar

As above. If you want each person on a separate report, then Render inside the macro, otherwise if you want them all on one report then render outside the macro. You will see the layout that the Batch Macro advised above will generate for each person and then you can arrange them. The method @OTrieger has described will be the quickest conversion from where you are.

 

The way that I would do this otherwise, would be to have another field that designates who the record belongs to. So, columns being Description; Transaction; Name; and then select the name as a grouping variable on the Table tool. No need for a macro then.

Labels
Top Solution Authors