Converting HTTPs link images/icons to Base 64 in Power BI
Last updated
Was this helpful?
Last updated
Was this helpful?
If you have a column of images/icons in https links format like below:
Then you can convert it to base 64 URL format, which is the acceptable format by the xViz Performance Flow visual (as it is certified):
Home → New Source → Blank Query
Change the name of the query to Query1 to ImgtoBase64Url and Click on Advanced Editor
Paste the below code and Click on Done:
Note: The prefix of "data:image/jpeg;base64, " must be adjusted as per the image extension, i.e. replace the "jpeg" with the extension of the image that you are using (eg: png, etc.)
Add Column → Invoke Custom Function
Add the following details in the popup:
Provide a name for the new column
Select the function query name “ImgtoBase64Url”
Select the column with Images URL
Result: This will result in a new column named "Image" which will contain the Base 64 URLs. Use this column in the xViz Performance Flow visual.
Here is an example report file: