Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Need all negative outputs to be zero

khill16
6 - Meteoroid

Hi. So I've got two ratings a Rating A and a Rating B. I have a formula in place for Rating A plus Rating B equals Rating C, with Rating C being the output column. Rating B can potentially be a negative number, which can sometimes makes the calculation for Rating C a negative number. However, if Rating C is a negative number, we want it to be zero instead. So zero should be the lowest value for Rating C. Can someone help me with a formula to make all calculations for Rating C be a minimum of zero (no negative numbers)?

 

I tried a formula with MIN(0, C) but that didn't work. I'm not sure if a find - replace for the negative numbers to zero is the solution either. Please help.

 

Thanks,

3 REPLIES 3
DavidSkaife
13 - Pulsar

Hi @khill16 

 

A simple IF formula would do the trick:

 

IF [Rating C] <0 THEN 0 ELSE [Rating C] ENDIF

 

Make sure you apply the formula to [Rating C] field!

MarqueeCrew
20 - Arcturus
20 - Arcturus

@khill16 ,

 

 you were so close!

 

 Hint:

 

max(-5,0) is what your after

 

 cheers

 

 m

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
khill16
6 - Meteoroid

This sorted it out for me. Thanks!

Labels