Alteryx Designer Desktop Discussions

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

Creating a Hex to Dec formula

vtika16
7 - Meteor

Hey guys,

 

Attached is a file that I use for a formula in excel to convert hexs to decs (Cell C3) and vice versa (Cell C6). Is there a formula that can do what this function is doing in excel? I don't think Alteryx has a Hex2Dec formula or a concatenate formula.

 

Any help would be appreciated. Thanks!

3 REPLIES 3
patrick_digan
17 - Castor
17 - Castor

@vtika16 I think the formulas would look something like this. Alteryx just uses a + instead of Concatenate. Alteryx has hextonumber and inttohex functions that you can use. I'm attaching a simple workflow that implements both calculations.

 

Hex to Dec:

Right("00000000"+tostring(HexToNumber(Left([Hex],8))),10) +Right("000000000000"+tostring(HexToNumber(Right([Hex],6))),8)

Dec to Hex:

Right("000000"+inttohex(tonumber(Left([Dec],10))),8)+Right("000000"+inttohex(tonumber(Right([Dec],8))),6)
vtika16
7 - Meteor

Patrick,

 

Thank you. I just found the hex2number function. I didn't know it would be that easy for a transition from the excel formula to Alteryx. Much appreciated. 

patrick_digan
17 - Castor
17 - Castor

@vtika16 Glad I could help! I've never dealt with Hex and Dec conversions before, so this was a welcome challenge. So thank you! You did all the hard work with your formulas in excel, and I did the easy part of converting it to Alteryx lingo. 

Labels