Forum Discussion
How to use Images Stored in a SQL Server Table with Power BI
- 8 years ago
Yes you can. See this article https://blog.gbrueckl.at/2018/01/storing-images-powerbi-analysis-services-data-models/
Hi guys,
Does anyone ever try or know how to do it with Direct Query ?
I tried with import and it's works, but when it is comes to Direct Query since it needs change data type on the column, it is not allowed unless I changed it to Import.
Anyone know how ?
Thanks
admin_xlsior I am not sure if you are still having this problem but what I found is I just created a Veiw within my SQL DB and used Json to convert the images from bianary to Base64Jpeg. The you would just pull the images from the view you created, but I am having a problem with the images being to large for Power BI to render them.
CREATE VIEW TNIPIC_VIEW AS
SELECT BACK
FROM OPENJSON(
(
SELECT CUSTOMER_ID, BACK, CHECKED_IN
FROM (SELECT DBO.YOUR DATABASE AS BACK) T
FOR JSON AUTO
)
)WITH (BACK VARCHAR(MAX))