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.
I have created an SQL database and tables to store images from a Powerapps application. The images are from the camera control in Powerapps. For testing I have both [varchar](max) and [varbinary](max) fields defined. The app saves the images from Powerapps to SQL with no problems.
I have a new Power BI report (lates version of Power BI Desktop) that i am connecting to this data base/table. In the [varchar] field, Powerapps saves the image as a base64 string (data:image/png;base64,[base64text]. I also found instructions to create new column in Power Query, convert a binary data type to a base64 text file. I have done that as well as a test to compare the original Powerapps image to the converted one. The resulting image is exactly the same as the one created by Powerapps saved to the [varchar](max) field. Both images can be added and display properly to a Gallery in Powerapps with no problems.
I selected the Image URL data category for both fields.
Finally, I added a table visual and selected the two fields. The following is the result.
I added the additional field to calculate the character length of the image field to ensure that it didn't exceed the 32,766 length limit. Both images are under 300kb. What have I missed? If I publish the report to the Service, the fields are black. I have tried this on several different computers running the lastest Power BI Desltop. Any ideas would be greatly appreciated.
Solved! Go to Solution.
Hi @mabeye09 ,
By my test, I think your images are bigger than limit.
I used a 3.66KB image(3,748 Bytes) and a 303 KB image (310,873 bytes).Here is the length in the SQL SERVER.
However, when I import it and change it to be image URL, only the smaller image can appear. Then I get their lengths.
You can see the length is limited to be 32766. So your image size needs to be under 32766bytes (32KB).The smaller, the better. For example, I imported a 19095-bytes image but its length is 25482-bytes in the Power BI.
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mabeye09 ,
By my test, I think your images are bigger than limit.
I used a 3.66KB image(3,748 Bytes) and a 303 KB image (310,873 bytes).Here is the length in the SQL SERVER.
However, when I import it and change it to be image URL, only the smaller image can appear. Then I get their lengths.
You can see the length is limited to be 32766. So your image size needs to be under 32766bytes (32KB).The smaller, the better. For example, I imported a 19095-bytes image but its length is 25482-bytes in the Power BI.
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks Eads,
I was using the camera on my compter to test the Powerapps app and the photos were much larger than expected. Using the camera control on the phone, it is working perfectly. Thanks again.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |