Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
We’re experiencing technical issues with our vendor that are affecting license activations for Designer Desktop. We don’t yet have an estimated resolution time. We apologize for the inconvenience and will share updates as we have them.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Signed short hexadecimal

myousuff81
7 - Meteor

Hi,

 

Need help to convert Signed short hexadecimal to decimal

 

 

For example FD80 should be converted to decimal value -640.  Can you please provide Alteryx solution for this in the formula tool?

2 REPLIES 2
JoeL
Alteryx Alumni (Retired)

Hi @myousuff81 ,

 

This should work as long as there is 1 hexadecimal per-row in the column. Can handle any size Hexidecimal!

 

 

if HexToNumber([HexField]) > HexToNumber(PadRight('8', length([HexField]),'0')) then

-2*HexToNumber(PadRight('8', length([HexField]),'0')) + HexToNumber([HexField]) else

HexToNumber([HexField]) endif

//PadRight('8', length([HexField]),'0') = negative crossover point

// -(negative crossover point as integer) - (subtracting negative crossover from original Hex) + (original hex)
// = -2(neg. crossover point as int) + (original hex as int)
// Joe L

 

 

Hexidecimal Formula.png

 
myousuff81
7 - Meteor

Thanks Joel. It works perfectly.

Labels
Top Solution Authors