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.
SOLVED

Dynamic Formula to Set Total to Zero When Any Current Field is Zero

KamenRider
11 - Bolide

Hello Alteryx Community,

 

I'm working on a workflow where I need to dynamically set the Total field to zero if any of the current_field values are zero. I have multiple Count_XX_XX_XXXX fields, and I want to apply this logic across all of them without hardcoding each field name.

 

Currently, I'm using a Multi-Field Formula tool to set individual fields to zero based on a condition, but I'm struggling to aggregate this logic to affect the Total field. Here's what I've tried so far:

Multi-Field Formula Tool: Applied a conditional formula to each current_field to set it to zero if the Reject Reason is "0".


Summarize Tool: Attempted to aggregate flags indicating zero values, but I'm unsure how to use this to set the Total field.

 

See screenshot below for your reference.

 

Convert to Zero.PNG

 

Could anyone provide sample workflow on how to dynamically set the Total field to zero if any current_field is zero? Any tips or best practices for achieving this in Alteryx would be greatly appreciated!

Thank you in advance for your help!

 

Kamen

8 REPLIES 8
atcodedog05
22 - Nova
22 - Nova

Hi @KamenRider,

 

Can you provide some sample data and expected output.

binuacs
21 - Polaris

@KamenRider something like below?

image.png

apathetichell
20 - Arcturus

I think the easiest way might be creating a new column by multi-field formula. using a boolean test if the value of [_CurrentField_] is 0 -- and then following the transpose/summarize for max value rule.

KamenRider
11 - Bolide

Hi @binuacs @apathetichell @atcodedog05 

 

I created a dummy file where you can use as an input file. Please see attached. Final Output should look like this. Total should be correct.

 

Ouput should look.PNG

Please let me know if you have questions.

 

Thanks,

Kamen

atcodedog05
22 - Nova
22 - Nova

Hi @KamenRider,

 

Here is a solution.

 

Paid off.png

 

Hope this helps : )

KamenRider
11 - Bolide

Hi @atcodedog05 

 

Thanks for the response. I made some update as per attached. Is it possible for you to combine those with same NII # or date?

 

should not.PNG

Correct

 

should be.PNG

Looking forward for your response.

 

Thanks,

Kamen

atcodedog05
22 - Nova
22 - Nova

Hi @KamenRider,

 

Please find the updated solution. I did some sorting changes too.

 

Paid off.png

 

Hope this helps : )

KamenRider
11 - Bolide

Hi @atcodedog05 

 

Thank you so much. You nailed it!

 

Kamen

Labels
Top Solution Authors