Forum Discussion

Charu's avatar
Charu
Icon for Post Patron rankPost Patron
8 years ago
Solved

How to display user image dynamically based on user login email ID

Hi Community,

Is there any ways to achieve the following scenario, When the user logs in then on the report page how to display their image.

I'm Using Oracle table in that one table where I'm maintaining Username, email in addition If I save their picture how to get it into the report using measure.

1.Suggest me where to save all users images 

2.measure to display the image dynamically based on user email id

For reference

  • Charu's avatar
    Charu
    8 years ago

    Hi v-yulgu-msft

     

    Thanks a lot for your help.

    I found the custom visual that is Image by CloudScope and storing image URL in the table as text data type and in power bi For the URL column did settings like Modelling tab ->datacategory->Image URL 

    Finally using RLS based user email and the image is displaying based on user login 

     

    I was thinking to write a logic to display the image but you made it very easy.Thanks once again

2 Replies

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Charu,

     

    In Power BI, it is not supported to load images from a database (binary column) directly into the data model and display them in visual. The only way to display images in a visual is to provide the URL of the image which is public accessible. 

     

    Since your images are all stored in Oracle Table, please try the workaround that converting any binary (Image Infor) to a Base64 encoded string which can then be displayed in PowerBI as a regular image. 

    Reference:

    Storing Images in a PowerBI/Analysis Services Data Models

    Embedding Images in Power BI using Base64

     

    Further more, to display image dynamically, you should apply dynamic RLS based on username here.

    Dynamic Row Level Security with Power BI Made Simple

    Power BI – Dynamic Row Level Security – Tips to get it working!

     

    Best regards,

    Yuliana Gu

    • Charu's avatar
      Charu
      Icon for Post Patron rankPost Patron

      Hi v-yulgu-msft

       

      Thanks a lot for your help.

      I found the custom visual that is Image by CloudScope and storing image URL in the table as text data type and in power bi For the URL column did settings like Modelling tab ->datacategory->Image URL 

      Finally using RLS based user email and the image is displaying based on user login 

       

      I was thinking to write a logic to display the image but you made it very easy.Thanks once again