Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Float to special format conversion

fmarin00
6 - Meteoroid

Hello group

I'm being asked to convert a 19.2 decimal format to eight int digits including two decimals, so if I have something like 100.50 it should be displayed as 00010050. I I have something like -70.49 then it should be displayed as -0007049. Is there a standard data type that can display this format?

 

Thank you 

Francisco

 

 

 

2 REPLIES 2
BrandonB
Alteryx
Alteryx

I think something like this should do the trick. First use a select tool to turn the column into a string. Then use a filter to split the positives and negatives into two streams. Then use a data cleansing tool on each stream to remove all punctuation. Then use a formula tool with the function pad left to make the positive 8 characters long and using a zero to pad on the left side. Do the same for the negative, but only pad by 7, because you will use another formula tool afterwards to add the negative sign. Then use a union tool to bring the string together. Workflow is attached. 

 

padleft.png

fmarin00
6 - Meteoroid

Brandon

It worked out perfectly.

 

Thank you

 

 

Labels