Base64 is used to encode binary data (e.g. metrics from Google Analytics) that needs to be stored and transferred over media that are designed to deal with textual data (e.g. Power BI). Contrary to belief, it is not a secure way to protect sensitive data.

Base 64 is an encoding algorithm, not an encryption algorithm, because it converts data into a reliable format, whereas encryption “hides” the data by protecting it with a password so that data can be viewed only by those who know the password.1

Here are the steps of the algorithm:

Creating a Custom Function

https://github.com/marinatetzlaff/marinatetzlaff.github.io/raw/master/images/post-2/img-04.png

Copy and paste this text into the editor:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WigoPyvGtSjbxCwkt8c1yNI0KNjDwc/HL9Ql3y4gM9yyJyvU08Q0JNYgKCcv1DwnLUoqNBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Lines.FromBinary(Binary.FromText([Column1],BinaryEncoding.Base64), null, null, 1252){0})
in
    #"Added Custom"

https://github.com/marinatetzlaff/marinatetzlaff.github.io/raw/master/images/post-2/img-05.png

Add a custom column:

Click again on our table and specify "ADD COLUMN >> CUSTOM COLUMN"

Copy this formula:

Lines.FromBinary(Binary.FromText(text,BinaryEncoding.Base64), null, null, 1252){0}

And replace text with the field you wish, for example:

{:width="50%" .align-center}

https://github.com/marinatetzlaff/marinatetzlaff.github.io/raw/master/images/post-2/img-06.png