Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Averaging a fixed decimal

eisesara
7 - Meteor

Hi,

 

I am attempting to summarize and average a fixed decimal with multiple decimal points (less than 1). Using a fixed decimal with precision of 22 and scale of 10. I am averaging ignore 0s.

 

When I summarize the value and average, I lose all decimal places in 2 of the fields. Any ideas why and any idea how to summarize and get more than ._ after?

 

eisesara_0-1612218109929.png

eisesara_1-1612218126916.png

 

1 REPLY 1
AngelosPachis
16 - Nebula

Hi @eisesara ,

 

I believe that happens because 0.5 is a rounded number and Alteryx just gets rid of the extra 0s, well because they are zero and for a numerical value they don't really matter.

 

You can put the 0s back there if you convert each of your columns into a string data type, and then use a padright formula to pad each cell with zeros

 

AngelosPachis_0-1612249987277.png

So that expression means that the string field should have 9 characters in length, and pad it with 0s to the right, until that number of characters is achieved.

 

Hope that helps,

 

Angelos

Labels
Top Solution Authors