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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Enrico_Riccato
Frequent Visitor

Dashboard não apresenta imagem após publicar em link público

Desenvolvi uma dashboard e publiquei ela mas ao publicar, as imagens não estão apresentando.
As importações estão no modo DirectQuery.

No editor, as imagens apresentam corretamente:

Enrico_Riccato_0-1680696848097.png

 

Enrico_Riccato_1-1680696878323.png

 

Mas após publicar ele apresenta da seguinte maneira:

Enrico_Riccato_2-1680697005400.png

 

Enrico_Riccato_3-1680697034272.png

 

Para apresentar as imagens estou usando o visual "Image by CloudScope (2.0.5)"

Enrico_Riccato_4-1680697092212.png

Estou colocando a URL em uma medida e colocando a medida no visual, segue código da medida:

ImagemComparativaPedidosFaturados =
SWITCH(TRUE(),
SUM('INDICADORES_VENDA'[QTDFATURADOS])>SUM('INDICADORES_VENDA'[QTDFATURADOSPASSADO]),
)

 

Erro que aparece no visual:

Enrico_Riccato_0-1680698118013.png

 



1 ACCEPTED SOLUTION

I was able to display the image. The error was actually in the visual I was using. To display the image, I did the following:

  1. I am pulling the image from the database and converting it from binary to an image in Power BI using the function I developed, which I mentioned in previous comments.

  2. I changed the visual and I am using "Simple Image". It has a particularity where it doesn't accept measures as a value in the "Image URL" field.

  3. To use "Simple Image", I added a new column to the image table with the following M code:
    let
    Tabela = #"INDICADORES_VENDAGER",
    SomaAtual = List.Sum(Tabela[QTDFATURADOS]),
    SomaPassado = List.Sum(Tabela[QTDFATURADOSPASSADO]),
    ColTeste = if SomaAtual > SomaPassado then [TrianguloVerdeCima] else [TrianguloVermelhoBaixo]
    in
    ColTeste
    With this code, I am always passing the URL of the desired image according to the condition I had set in the DAX code.

  4. After creating the column, I added it to the "Simple Image" visual and it worked after publishing!

     

    Thank you for your help!

     

View solution in original post

5 REPLIES 5
lbendlin
Super User
Super User

You can use icons or embedded images for this. No need to call external URLs and wake up the dataset privacy police.

I tried to use embedded images but doesn't work.

I changed the DAX code of the measure to the following:

ImagemComparativaPedidosFaturados =
SWITCH(TRUE(),
SUM('INDICADORES_VENDA'[QTDFATURADOS])>SUM('INDICADORES_VENDA'[QTDFATURADOSPASSADO]),"SELECTEDVALUE('sankhya AD_IMGPBI'[TrianguloVerdeCima]),
SELECTEDVALUE('sankhya AD_IMGPBI'[TrianguloVermelhoBaixo])
)
 
I saved the image in the database, passed it to Power BI as binary, and converted it to an image using the function:

let
BinarioparaImagem = (ColunaBinario as binary) as text=>
let
Base64 = "data:image/png;base64, " & Binary.ToText(ColunaBinario, BinaryEncoding.Base64)
in
Base64
in
BinarioparaImagem

It seems that the images are not being displayed once you publish the report online, even though they are displayed in the editor.

Editor:
Enrico_Riccato_1-1681138347485.png

 

After publishing the report online:
Enrico_Riccato_2-1681138487726.png

 

 

I was able to display the image. The error was actually in the visual I was using. To display the image, I did the following:

  1. I am pulling the image from the database and converting it from binary to an image in Power BI using the function I developed, which I mentioned in previous comments.

  2. I changed the visual and I am using "Simple Image". It has a particularity where it doesn't accept measures as a value in the "Image URL" field.

  3. To use "Simple Image", I added a new column to the image table with the following M code:
    let
    Tabela = #"INDICADORES_VENDAGER",
    SomaAtual = List.Sum(Tabela[QTDFATURADOS]),
    SomaPassado = List.Sum(Tabela[QTDFATURADOSPASSADO]),
    ColTeste = if SomaAtual > SomaPassado then [TrianguloVerdeCima] else [TrianguloVermelhoBaixo]
    in
    ColTeste
    With this code, I am always passing the URL of the desired image according to the condition I had set in the DAX code.

  4. After creating the column, I added it to the "Simple Image" visual and it worked after publishing!

     

    Thank you for your help!

     

I stored the image according to the link you sent, but the same error persisted. I believe the issue may be with the visualization, as I displayed the image in a table and it appeared correctly. I will try changing to a different visualization.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.