
2. Re: writing a calculated field for a base 10 to base 36 converter
Gregory Askew Sep 21, 2016 6:52 AM (in response to Akriti Lal)No I know about that function and I think I'll need to use it in my calculated field, but what I'm trying to do is write a calculation that will translate an ID such as: 17275725 (base 10) to AAA19 (base 36).
When I put these into an online converter it does this just fine, but I need a converter in my tableau as I have over 400 IDs and doing them all individually doesn't seem like the best way to do it.
I tried (LOG(10,[Numeric_ID]))/LOG(10,36) but this gives log_36[short_ID] but all I'm looking for is short_ID
Maybe I can wrap the formula in something exponential that will get rid of the log_36?
Thanks

3. Re: writing a calculated field for a base 10 to base 36 converter
Łukasz Majewski Sep 21, 2016 7:00 AM (in response to Gregory Askew)This formula will give you the number as base 36 string (up to 6 letters):
You can choose your base with the parameter.

baseX.twbx 33.8 KB


6. Re: writing a calculated field for a base 10 to base 36 converter
Gregory Askew Sep 21, 2016 7:43 AM (in response to Gregory Askew)or have you defined Base10 and base as dimensions previously?
As In my calculated field they're not orange or purple respectively.
Akriti, I'm trying to convert numeric ids which are in base 10 into base 36, which come out as something like AAA45, the reason that the LOG function doesn't work is because it just outputs the log in numbers, not in the correct base 36 form

7. Re: writing a calculated field for a base 10 to base 36 converter
Łukasz Majewski Sep 21, 2016 8:02 AM (in response to Gregory Askew)I attached a packaged workbook (9.3) so you can open it and check everything. I used a sample of numbers  [base10] field  and the [base] is a parameter.

8. Re: writing a calculated field for a base 10 to base 36 converter
Łukasz Majewski Sep 21, 2016 8:16 AM (in response to Gregory Askew)replace my fields with yours....
I guess [Bot Id] instead of base10 and 36 for [base] if you do not want a parameter...
is this your first tableau workbook?

9. Re: writing a calculated field for a base 10 to base 36 converter
Gregory Askew Sep 22, 2016 1:33 AM (in response to Łukasz Majewski)I realised that you cant use char with a live data source only an extract so I did that and it worked perfectly, thanks very much!
Nope not my first workbook but my first one using a calculated field..usually I do all that stuff on bigquery before but this way was easier this time