Handling long Base 64 URLs in Power BI
If the images are displaying partially in Power BI with the Base 64 URLs, then the reason is the character limit in Power BI. The maximum length of a text value that the Power Query engine can load into a single cell in a table in a dataset is 32,766 characters – any more than that and the text will be silently truncated.
![](https://docs.xviz.com/~gitbook/image?url=https%3A%2F%2F382510089-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FIuuIZWiXEx25eV75hmmJ%252Fuploads%252FvtNsysyffzz39132Yfsn%252Fimage.png%3Falt%3Dmedia%26token%3Df6a070de-97cb-48fe-ac2e-6e24acb665c1&width=768&dpr=4&quality=100&sign=10901bb7&sv=1)
Check the length of characters of the Base64 URL in Transform Editor/Power Query
To understand what the length of the Base 64 URLs for your images is, please follow the below steps:
Select the Base 64 column of the image
Add column → Extract → Length
![](https://docs.xviz.com/~gitbook/image?url=https%3A%2F%2F382510089-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FIuuIZWiXEx25eV75hmmJ%252Fuploads%252Fx62cLxbcUi9CeXiXgSs7%252Fimage.png%3Falt%3Dmedia%26token%3D89309fc1-3181-4735-9619-5794f1c9b789&width=768&dpr=4&quality=100&sign=2a6f1de5&sv=1)
You will now be able to see the length of the Characters of all the Base64 URLs
![](https://docs.xviz.com/~gitbook/image?url=https%3A%2F%2F382510089-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FIuuIZWiXEx25eV75hmmJ%252Fuploads%252FpcDoLqQhvZVRD7hDjQfs%252Fimage.png%3Falt%3Dmedia%26token%3D95e2d924-53a3-40f8-8d55-c6f45c2070c7&width=768&dpr=4&quality=100&sign=5e0cbf68&sv=1)
Steps to handle long Base 64 URLs to display the full images
Step 1: Data Type of the Base 64 URL column
Ensure that the data type of the Base 64 URL column must be "Text"
![](https://docs.xviz.com/~gitbook/image?url=https%3A%2F%2F382510089-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FIuuIZWiXEx25eV75hmmJ%252Fuploads%252FrTOtzDsYS3fjE1wQGx3H%252Fimage.png%3Falt%3Dmedia%26token%3De495f162-7395-4c80-8b89-87c0199001a2&width=768&dpr=4&quality=100&sign=2c2b841d&sv=1)
Step 2: Transformation steps in Advanced Editor
Open the Advanced Editor of the same query for the next set of steps:
Click on Advanced Editor
![](https://docs.xviz.com/~gitbook/image?url=https%3A%2F%2F382510089-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FIuuIZWiXEx25eV75hmmJ%252Fuploads%252FYDgedwKosNdCack57Zt6%252Fimage.png%3Falt%3Dmedia%26token%3Dc04e660b-5d7c-4512-ad07-561459afae68&width=768&dpr=4&quality=100&sign=13939074&sv=1)
Copy and paste the below code in the existing steps:
Note: Ensure to replace LastStepName with the name of the last step that you see in the Advanced Editor before pasting this code
The final query should look something like as shown below:
![](https://docs.xviz.com/~gitbook/image?url=https%3A%2F%2F382510089-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FIuuIZWiXEx25eV75hmmJ%252Fuploads%252F2GfpUNOKHVU6P8pkS2rk%252Fimage.png%3Falt%3Dmedia%26token%3Df257273c-5ff8-4470-beab-d6b07b9fb614&width=768&dpr=4&quality=100&sign=655d7f53&sv=1)
Step 3: Creating a DAX measure to group the Base64 URL to display the images
Create the below DAX measure to display the images
Add the DAX measure in the Performance Flow visual and display the images
![](https://docs.xviz.com/~gitbook/image?url=https%3A%2F%2F382510089-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FIuuIZWiXEx25eV75hmmJ%252Fuploads%252FBmNEmciVt7qPsbqJ51g6%252Fimage.png%3Falt%3Dmedia%26token%3D6fb661f7-8882-4162-93d7-9e5642092caf&width=768&dpr=4&quality=100&sign=e073e9a7&sv=1)
Last updated