Alteryx Designer Desktop Discussions

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

Formula to show 0 if there are no records

mhawkin1
5 - Atom

Hi!

 

For this workflow, I am looking to sum the total amount of overdrafts from a report that is produced daily. If there are overdrafts in the report, I want the formula to include the sum total from the summarize tool. If there are no overdrafts, I want the formula tool to say there were no applicable overdraft. When there are no applicable overdrafts, the summarize tool will have no records and I cannot get the formula to populate. The count tool wouldn't work since I need to sum the total overdraft amounts. I have attached the formula below for reference. Any ideas?

 

 

4 REPLIES 4
ChrisTX
15 - Aurora

Use a Filter tool, then a Count tool.  The Count tool will always return one record, even if the count is zero.

 

Chris

mhawkin1
5 - Atom

Where might those go? If I use the count tool, how would I be able to sum the total amount of overdrafts if there are any?

ChrisTX
15 - Aurora

Your incoming data single stream will split into two.

 

After the Filter and Count tools, use an Append Fields tools to append the Count back to your original data stream.  The you can use [Count] in your Formula tool.

 

These tools are covered above under Learn > Academy > Learning Paths and Interactive lessons.

 

Chris

mhawkin1
5 - Atom

Chris,


Thanks for your help. I was able to get this to work.

Labels