Рет қаралды 54,768
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
www.base64-image.de/
Method 2: Multiple Images (10 or more)
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
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: amzn.to/3lNAi2L
Microphone: amzn.to/2YUu34j
Mic Windscreen: amzn.to/3lRdOhi
Mouse and Keyboard: amzn.to/3jbR3TM
Monitor Screen: amzn.to/3vkQcF6