Alteryx Designer Desktop Discussions

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

If formula not calculating correctly across whole population

Pborella
Átomo

Hi,

 

I am using an If formula to populate a new column with either a 1 or 0 depending on the calculation. The goal is to match several columns data for each row and populate the new column with a 1 if each columns numbers match. The issue I am seeing is that there are instances where the row has the same number across the columns within the formula but the new column is being populated with 0 instead of the expected 1. Many are being done correctly and the new column has a 1 but some are not and that causes none of the data to be reliable. Why is the formula not working correctly for the whole population, or is there a different way to match the data across the columns for each row. 

 

All of the data types being used in the formula are double

 

The formula:

IF [4/22/2024]=[4/19/2024] and [4/19/2024]=[4/18/2024] and [4/18/2024]=[4/17/2024] and [4/17/2024]=[4/16/2024] and [4/16/2024]=[4/15/2024] and [4/15/2024]=[4/12/2024] and [4/12/2024]=[4/22/2024] THEN 1 ELSE 0 ENDIF 

 

 

 

3 RESPOSTAS 3
aatalai
Magnetar

try changing your numbers to integer or rounding them (us multi field tool to apply to several fields in one go)

Pborella
Átomo

This did work, unfortunately my data needs to include 2 decimal points as it is dollar amounts. I appreciate your help nonetheless. 

Pborella
Átomo

I was able to fix the problem by using fixed decimal data type with only 2 decimal points. 

Enquetes
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Rótulos