Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
djpirra
Helper III
Helper III

Binary to Text always gets weird characters

Hi everyone,

 

I am currently trying to convert an identified column as binary into its text format.

Basically this column is supposed to have a connectionstring.

The function that I am trying to use is Text.FromBinary but the output gets like this:

 

»Êo…Aڐ*[™ÄƒkWúq¯/Œ�¿ÜÎ�vÁ!ÒíÕº®tp´rxÑøŠ.ÑDP�–<m²­þ9AMhöD4KÅ�qñjQϘƒ§š8éŸó ¡…ô��ªÕswÐngp¤3hH�u?}​​​​​​​�€Óç䘋���6¦���†f¤¤‚ô

 

What is missing?

 

Thank you

 

Regards,

LS

12 REPLIES 12
amitchandak
Super User
Super User

@djpirra , have tried Binary.ToText with encoding option https://docs.microsoft.com/en-us/powerquery-m/binary-totext

 

Yes I did, when doing it the output is something like this:

 

BQMmmJ++VoLV6Aipye2Sn1/A+c43QtQuH38tp/WNmLkT/cfAbcz4NKBHx0TIYRXwE4eo+LjjKL8IgXpUQRNmZy6rkNDz7clsRrFPJSxMPJV+X8CnBGQC8itc8Kx3DZjufhSnC3VdP2tOVXJuXHLqM+R0XFygbmexgwzb7bHZ7ypclBp8h1EjFbZJi8VMLirzeitkqTN/azLl8dV4PZx7vvPKW+9NpDmo

Hi @djpirra 

How was the connection string encoded to binary?  If you know that you can decode it.  If you don't we're just guessing how to do it.

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi Phil,

 

I guess the column in the catalog table is a VARBINARY? Its being recognized automatically by Power BI as Binary.

 

 

HI @djpirra,

Any encrypt existed in your file? If this is the case, you can only decode the encrypted string instead of raw file contents. Did you know the raw file format?

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi Xiaoxin,

 

What file you refering to?

The data is directly coming from the "Catalog" table of the Reporting Services database.

 

Thank you

Hi @djpirra,

How about enabling the 'advance option' - 'SQL statement' to direct use t-SQL query to convert them to string on the database side? It should have better compatibly than processing on the power bi side.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
PhilipTreacy
Super User
Super User

Hi @djpirra 

The data could be compressed, or you might not be decoding it with the correct algorithm. Do you know how it was converted from text into binary?

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi Phil,

 

The data comes from a Reporting Services catalog table where this column is a varbinary.

Hi @djpirra 

Can you share one of these binary values so I can try converting it?

Regards

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


@PhilipTreacy  when I click on the binary link for one of the rows I get a file icon.

When I click the file icon and select show text it breaks into two rows having these values:

 

M«r,s¤>¿|3ÅiA=Kwxj�¥Ù�3B��ªë�„€³8×Ïña¹\Oƒ¸f½2Õ…Q�£R=J

þˆc.ÀÒLh�Õnä‡l�ˆÜ‡�=û¯\®Z“O�Ý°á²kqÍ×�ê´õª2Qà¡­Üi[Z9CŸÃýío¯�o—]Ò�â¸?ó\¶�SµF°÷Ók†Š�ú¦*+&aÞ±Sûw’4

 

 

Thanks

vanessafvg
Super User
Super User

that looks corrutped to me... are you able to share some data?




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.