Alteryx Designer Cloud Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Cloud.
SOLVED

Hi! I can't change the format to Decimals cause the numers are too large.

This is an example. I have NN.NNNN,NN number and if It's a String column, no problem but if I change it to Decimal, Trifacta says that is missmatched. How can I fix it?

Here is the image.

 

Thank you so much! :)

2 REPLIES 2
Trifacta_Alumni
Alteryx Alumni (Retired)

Hi @Javier Martin Gonzalez?,

 

Trifacta recognizes numbers formatted as "NNNN.NN" as decimals. The "N.NNN,NN" format is not one of the formatting strings that the decimal datatype accepts as valid. You will want to change the "N.NNN,NN" numbers into "NNNN.NN" format in order to create a column with a decimal datatype.

 

You can change the format of the column by using the "Replace text or patterns" transformation on the "." and "," values in your data. The easiest way to trigger this transformation is to directly select values in a column. This technique is called predictive transformation, and is particularly useful when you want to identify or modify patterns.

 

First, highlight the "." in one row of your data. This will generate a set of suggested transformations on the right side of the screen. Scroll through the list of suggestions until you see an option that reads, "Replace `.` with '' in <column>". The suggestion will look like this:

When you click on the suggestion card, you will see two buttons appear. Choose the button that reads "Add" to apply this suggestion to your recipe.

 

Your data should now display numbers in the format "NNNN,NN". Next, select the "," in a row of your data. Once again this will generate a set of suggested transformations. Scroll through the list until you see a suggestion that reads "Replace `,` with '' in <column>". This time, click the "Edit" button to open the transformation in the builder. We can modify the suggested transformation to replace all commas with periods.

From the transformation builder, enter a single period in the box that reads "Replace with", as shown in the image below:

Click "Add" to save your step.

 

You have now reformatted your column so that the data can be recognized as a valid decimal.

 

Let me know if this helps! If so, remember to mark "Best answer" so other users can see that your question has been resolved.

Thank you so much! 😄

Is what I did 30 min ago (trying and trying... haha) and I'm happy that is right.

 

Again, thanks! 😊