Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Input file has negative values

BuckeyeJane
7 - Meteor

I apologize if this has already been covered.  

 

I have an input file that can contain negative pricing amounts and am using a select tool to set the data type and size for the field. It is set to Type = Double. 

 

The following conversion errors are received. The workflow has a Cleansing tool before and does the following: 

1.  Replace NULLS with Blanks (String Fields)

2.  Replace NULLS with zeroes (Numeric Fields)

3.  Remove Leading and Trailing Whitespace. 

 

I'm not sure why i'm getting these errors?  Has anyone ever dealt with this issue?  Any ideas on how to clear it?

 

ConvError: Select (9): PRICINGAMOUNT: 2500.00- lost information in translation
ConvError: Select (9): PERCENTAGE: 0.0000 lost information in translation
ConvError: Select (9): PRICINGAMOUNT: 0.00 lost information in translation
ConvError: Select (9): PERCENTAGE: 100.0000 lost information in translation
ConvError: Select (9): PRICINGAMOUNT: 42500.00- lost information in translation
ConvError: Select (9): SURCHARGERATE: 62500.00- lost information in translation
ConvError: Select (9): PERCENTAGE: 100.0000- lost information in translation

 

The second issue happening is that the double data type is loosing the negative value.  How can i keep the -42500 as the field value?

 

Thank you in advance for your help.  I am so appreciative!

 

4 REPLIES 4
Thableaus
17 - Castor
17 - Castor

Hi @BuckeyeJane 

 

Could you share a sample of the data you're having these conversion errors?

 

Cheers,

BuckeyeJane
7 - Meteor

Yes -  Below are some screen shots of the raw data.  Thank you so much!

 

Capture.PNG

 

Thableaus
17 - Castor
17 - Castor

@BuckeyeJane 

 

The negative sign is in front of the decimal number. You need to use a Formula Tool to properly put it before the number itself.

 

Could you share a file with a sample of the data? You can simply leave the fields you're having trouble with, you don't need to share your sensitive data.

 

Cheers,

cmcclellan
13 - Pulsar

@BuckeyeJane wrote:

How can i keep the -42500 as the field value?

 

 


 

This will help, as @Thableaus said you need to move the minus sign to the front by doing this:

 

 

if Right([PRICINGAMOUNT], 1) = "-"
then right([PRICINGAMOUNT],1) + left([PRICINGAMOUNT], Length([PRICINGAMOUNT])-1)
else [PRICINGAMOUNT]
endif

 

 

It could be the same issue with PERCENTAGE, but remember that 100 should really be 1 (so divide by 100).  The data type could be causing the issue with 100.0000

Labels