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'm trying to use images as the "column names" in a table, where instead of the column name, at the top of each column is the image instead of a text name. As recent as a few months ago, I was able to do this by importing the images using the "Folder" source, and then converting the images to local URLs using the following custom function, and then dragging the URL field to the "column" section of the matrix visual:
let BinaryToPbiImage = (BinaryContent as binary) as text=> let Base64 = "data:image/jpeg;base64, " & Binary.ToText(BinaryContent, BinaryEncoding.Base64) in Base64 in BinaryToPbiImage
Today when I tried to do the same thing, the pictures appeared in the matrix columns as normal, but when I tried to order the pictures alphabetically by name, I got a "Can't display the visual" error. When I clicked for more details, it said "Memory error: While attempting to store a string, a string was found that was larger than the page size selected. The operation cannot be completed."
Does anyone know how to fix this? Any help on this would be incredibly appreciated!
Solved! Go to Solution.
Update: I tried the function on other pictures and it seemed to work as expected. I noticed that the .jpegs that it worked with were much smaller than the pictures that it didn't work with, so I got the pictures under about 20 kb each and it's now working perfectly! I guess the length of the URL string is directly correlated with how big the file is.
hi, @christinamarie
When you try to order the pictures alphabetically by name, if you could try to use the Sort by Column button
Add a rank column for this picture column, then sort by column not sort it directly.
Best Regards,
Lin
@v-lili6-msft Sorry, to be clear, I was using the Sort by Column. Each picture has a name "Tommy.jpeg", "Lisa.jpeg", and also has the local URL column called BinarytoPbiImage, which I've placed in the "Column" field of the matrix visual. Whenever I try ordering BinarytoPbiImage by name, I get the error. I attempted what you said and tried using an Index column (numbered it in alphabetical order starting from one) but I ended up getting the same error. 😞
Update: I tried the function on other pictures and it seemed to work as expected. I noticed that the .jpegs that it worked with were much smaller than the pictures that it didn't work with, so I got the pictures under about 20 kb each and it's now working perfectly! I guess the length of the URL string is directly correlated with how big the file is.
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |