Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Condition with image by cloudscope

Hello,   I have a filter and image by cloudscope as shown:    When I don't select anything or more than 1, it shows me by default the first Picture, what I want is to display a message sayi...
  • v-yueyunzh-msft's avatar
    v-yueyunzh-msft
    3 years ago

    Hi , Anonymous 

    Thanks for your quick response! According to your description, you have the [Image Url] columns in your table.

    Here are the steps you can refer to :
    (1)This is my test data:

    (2)We can create a measure like this:

    Measure = var _slicer = VALUES('Table'[Column1])
    var _image =  MAX('Table'[Image])
    return
    IF(COUNTROWS(_slicer)=1 , " <html>
    <body>
    <img src='  "& _image & "    ' alt='Girl in a jacket' width='500' height='600'>
    </body>
    </html> " ,"
    <html>
    <body>
    <h2>You need to select one!</h2>
    </body>
    </html>")

     

    (3)Then we can also put the measure on the "HTML Content" visual and then we can meet your need :

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

    20230126show image and text.pbix161 KB