Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

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

Is there a way to get only one sig fig after the decimal point when exporting to Excel?

Brad1
11 - Bolide

Example:

0.5

17.0

115.2

1.2

0.0

 

Thanks, in advance.

3 REPLIES 3
NicoleJohnson
ACE Emeritus
ACE Emeritus

If you add a Select Tool before exporting your data, you can change the field type to show only 1 decimal place for that field - use the Fixed Decimal format and change the number of characters to n.1 (n characters before decimal, 1 character after). That should do it!


Capture.JPG

NJ

Brad1
11 - Bolide

Yeah, that's what I thought s/b be the case only that's not what I'm seeing.  Nothing would ever be over 100 miles (or even close to 100 miles) - so I picked 3.1 just to be extra safe.  3.1, in my mind, should have covered out to 999.x - only it doesn't.  At that setting, any distance 10.x miles and up is returned as a blank field.  So I assumed I must be using the wrong field type.  Since reading your post, I bumped it up to 4.1 and suddenly it's working.  Changed it back to 3.1 and, again, anything 10.x and up is blank in Excel again.  Makes me think the number to the left of the decimal point counts all numbers including the decimal point.  Don't know if that's true or not.  In any case, 4.1 works for 99.x and less.  3.1 or lower returns a blank field in Excel - for me, at least.  Thanks for your help.  I'll call it resolved as 4.1 works - although I don't understand why it can't be as low as 2.1 . This is what returned with anything less that 4.1.  Thanks for your help.  I appreciate it.

 

FindNearestRankDistanceMiles
10.7
21.8
3 
10.5
20.8
30.9
NicoleJohnson
ACE Emeritus
ACE Emeritus

You are totally correct, @Brad1 - my apologies! First number appears to be for the total number of characters, second number is for the number of characters after the decimal. So if that's the case, the number to the left of the decimal probably always needs to be at least 2 characters higher than the number to the right of the decimal. I probably never noticed it because it defaults to 19.6, and I must have only ever changed the number after the decimal... learn something new every day! :) Thanks!!

Labels
Top Solution Authors