Hello there,
Iam trying to create PowerBi dashboard for showing dynamic images (highquality). However, Images which I used to create has been imported from our local server.
I have taken some helps from youtube but it is not working. M script considered to convert local images into base 64 is as below: (For reference)
let
//Get list of files in folder Source = Folder.Files(Z:\Best Practices\DCDR\Images_Videos),
//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 Convert OneFile(_)),
//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
= List.Transform(ListInput, each ConvertOneFile(_))
= Table.AddIndexColumn(ToTable, "Index", 0, 1)
Please guide me thoroughly to create PowerBi dashboard as per my requirement mentioned above.
Further any details required to understand my scenerio in broader picture, I would love to explain at anytime.
Screenshot of the same has been enclosed for your reference.
Regards,
Vikash Singh
Hello,
Once again Iam writing on my query to seek solution of my problem.
Request you to please go through my query and try to provide me soution of the same.
Regards,
Vikash
Hi @VikashSingh
Basically we can create dashboard in power bi services..
So the problem you are facing is quality images, if yes, please try to configure the image links with Image url from data category
Please configure those images column with images url and check it.
Hope it will works.
Hello Rajendra,
Thanks for prompt reply but I have been using those images column with image url only.
Screenshot of the same enclsoed herewith for yur information.
User | Count |
---|---|
135 | |
59 | |
56 | |
55 | |
47 |
User | Count |
---|---|
130 | |
73 | |
54 | |
54 | |
50 |