Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am getting the above error message on this piece of PowerQuery code
body = Text.ToBinary(Json.FromValue([login_id = client_id, security_key = client_secret]))
client_id and client_secret are defined as parameters, type "Text" and they are alphanumerics strings except for a single "@" in client_id and a single "-" in client_secret
The error doesn't even make any sense as I thought we're converting to binary not from binary.
I'm on Version: 2.126.927.0 64-bit (February 2024) if that makes any difference.
Any help appreciated,
David
Solved! Go to Solution.
That's because JSON.FromValue outputs a binary type, which you are then wrapping in Text.ToBinary. So you are now feeding the Text.ToBinary function an already binary value (the JSON.FromValue). PQ is saying " this value is not text".
--Nate
Can't you just remove the Binary.FromText function?
That's because JSON.FromValue outputs a binary type, which you are then wrapping in Text.ToBinary. So you are now feeding the Text.ToBinary function an already binary value (the JSON.FromValue). PQ is saying " this value is not text".
--Nate
Thanks Nate. I got that code from a MS support resource in another thread so I assumed it was correct code. Back to the drawing board...
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
13 | |
13 | |
11 | |
8 | |
8 |