Power Bi : Use Local Images in Power Bi. 3 Different Methods

Dapper Dash
Dapper Dash
55 هزار بار بازدید - 3 سال پیش - 0:00
0:00 Start
0:28 Tutorial Introduction
1:38 Method 1 (Small Image)
6:39 Method 2 (Multiple Small Images)
16:17 Method 3 (Large Images)
35:32 Image Pro by CloudScope
38:50 Thank You

Resources :

Method 1: Simple Method
https://www.base64-image.de/


Method 2: Multiple Images (10 or more)
https://blog.gbrueckl.at/2018/01/stor...

Base64 Convert Function =
let
   BinaryToPbiImage = (BinaryContent as binary) as text=>
let
   Base64 = "data:image/jpeg;base64, " & Binary.ToText(BinaryContent, BinaryEncoding.Base64)
in
   Base64
in
   BinaryToPbiImage



Method 3: Higher Resolution or File Size Images

https://blog.crossjoin.co.uk/2019/05/...

Import Images Function =
let
   //Get list of files in folder
   Source = Folder.Files("F:\PowerBiTutorials\DapperDash_4_LocalImagesInTable\Pictures\RealEstate"),
   //Remove unnecessary columns
   RemoveOtherColumns = Table.SelectColumns(Source,{"Content", "Name"}),
   //Creates Splitter function
   SplitTextFunction = Splitter.SplitTextByRepeatedLengths(30000),
   //Converts table of files to list
   ListInput = Table.ToRows(RemoveOtherColumns),
   //Function to convert binary of photo to multiple
   //text values
   ConvertOneFile = (InputRow as list) =>
       let
           BinaryIn = InputRow{0},
           FileName = InputRow{1},
           BinaryText = Binary.ToText(BinaryIn, BinaryEncoding.Base64),
           SplitUpText = SplitTextFunction(BinaryText),
           AddFileName = List.Transform(SplitUpText, each {FileName,_})
       in
           AddFileName,
   //Loops over all photos and calls the above function
   ConvertAllFiles = List.Transform(ListInput, each ConvertOneFile(_)),
   //Combines lists together
   CombineLists = List.Combine(ConvertAllFiles),
   //Converts results to table
   ToTable = #table(type table[Name=text,Pic=text],CombineLists),
   //Adds index column to output table
   AddIndexColumn = Table.AddIndexColumn(ToTable, "Index", 0, 1)
in
   AddIndexColumn


DAX Function To Concatenate Split Image
Image =
var img =
IF(
   HASONEVALUE(ImageIndex[Name]),
   "data:image/jpeg;base64, " &
   CONCATENATEX(ImageIndex,
   ImageIndex[Pic],
   ,
   ImageIndex[Index],ASC)
)

return img


************************
Equipment Used
************************

Camera: https://amzn.to/3lNAi2L
Microphone: https://amzn.to/2YUu34j
Mic Windscreen: https://amzn.to/3lRdOhi
Mouse and Keyboard: https://amzn.to/3jbR3TM
Monitor Screen: https://amzn.to/3vkQcF6
3 سال پیش در تاریخ 1400/01/27 منتشر شده است.
55,090 بـار بازدید شده
... بیشتر