community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

No output when summing empty filter (need 0)

Atom

I have attached a an example of the type of flow that I am building. I have an enormous excel file of accounts, profit centers, and amounts, and I have to filter for specific account/profit center combos and then sum the amount for those entries. I am trying to output a complete list of all the sums, but occasionally there is an account/profit center combo that has no entries.

 

In this situation I want the output to read zero but as it is, alteryx just doesn't provide output for that summary (as you can see, there are two output lines even though there are three summarize tools). This is a problem because if I'm running a workflow to output 150 sums, and one of them is empty, I receive an output with 149 sums and then I have to go through individually and find out which is the empty one.

 

Is there a way that I can make sure that there is still a line in the output (zero, null, blank, etc.) even if there is nothing in the filter to sum?

 

 

Alteryx.PNG

Magnetar
Magnetar

Try adding a text input with all required profit centers listed with an amount of 0... then union that to your original data before summarization, and that should return a record with a sum of 0 for anything that didn't have an amount in your original data.

 

Another tip - you probably don't need to filter & summarize for each profit center and union back together... try grouping by your profit center in a single Summarize tool and then using the Sum function for your value field. This will create a row for each profit center with the summarized amount without having to go through all the filtering & unioning back together.

 

NJ

Bolide
Bolide

Hi @hcg,

 

Try something like this, provided record count 0, Union with a [Null] record:

 

img1.JPG

 

Thanks,

Rafal

 

#Excuse me, do you speak Alteryx?

Labels