Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
VikashSingh
Regular Visitor

Creating dashboard of Dynamic Images in power Bi from local server

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.

 

VikashSingh_0-1673850420303.png

 

Regards,

Vikash Singh

 

 

3 REPLIES 3
VikashSingh
Regular Visitor

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

rajendraongole1
Post Prodigy
Post Prodigy

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 

 

rajendraongole1_0-1673851062889.png

 

 

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.

 

VikashSingh_0-1673851309487.png

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.