This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi,
I have the VBA code for a base62 decoding and want to use that function in a dataflow to convert IDs. Does anyone know how to implement that function in a parameter query?
Function Base62Encode(ByVal num As Variant) As String
Dim base62_chars As String
base62_chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
Dim base62 As String
base62 = ""
Do While num > 0
base62 = Mid(base62_chars, (num - Int(num / 62) * 62) + 1, 1) & base62
num = Int(num / 62)
Loop
Base62Encode = base62
End Function
Thanks for any help!
Solved! Go to Solution.
found a solution 😁:
let
// Base62 character set
base62Chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
// Function to convert a number to Base62
NumberToBase62 = (num as number) as text =>
let
base = 62,
Convert = (n, acc) =>
if n = 0 then
acc
else
@Convert(Number.IntegerDivide(n, base), Text.Middle(base62Chars, Number.Mod(n, base), 1) & acc)
in
if num = 0 then
"0"
else
Convert(num, "")
in
NumberToBase62
Hi @PBINewby ,
Thanks a lot to hear that you got the solution and that you shared your answer and can mark him as solution!
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
found a solution 😁:
let
// Base62 character set
base62Chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
// Function to convert a number to Base62
NumberToBase62 = (num as number) as text =>
let
base = 62,
Convert = (n, acc) =>
if n = 0 then
acc
else
@Convert(Number.IntegerDivide(n, base), Text.Middle(base62Chars, Number.Mod(n, base), 1) & acc)
in
if num = 0 then
"0"
else
Convert(num, "")
in
NumberToBase62
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 11 | |
| 8 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 24 | |
| 24 | |
| 23 | |
| 19 | |
| 16 |