Forum Discussion

mehlenbae2's avatar
mehlenbae2
Icon for Helper II rankHelper II
2 years ago
Solved

Simple Image Visual will not go away when slicer unselected

Hello,

 

I have a Simple Image visual that shows up ONLY when any value is selected from my "Sim ID" slicer. This works perfectly until I select a value in the "Sim ID" slicer and then UNSELECT the value in the slicer, the Simple Image visual will not go away.

 

I have a measure called "Show Simple Image":

 

Show Simple Image =
IF (
    ISFILTERED ( 'Campaigns'[Sim ID] ) && COUNTROWS(ALLSELECTED('Campaigns'[Sim ID])) > 0,
    1,
    0
)
 
Any idea of how to fix this?
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi mehlenbae2 ,

    Thank you and I successfully opened your .pbix file.

    I think you can change the 1 and 0 in the measures named Hide Line Chart and Show Simple Image.

     

    Hide Line Chart = IF(
        ISFILTERED ( 'Campaigns'[Sim ID] ),
        0,
        1
    )
    Show Simple Image = 
    IF (
        ISFILTERED ( 'Campaigns'[Sim ID] ) && COUNTROWS(ALLSELECTED('Campaigns'[Sim ID])) > 0,
        0,
        1
    )

     

    Then I think it will achieve your requirements.

     

     

     

    Best Regards

    Yilong Zhou

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

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi mehlenbae2 ,

    I create a table as you mentioned.

    Then I change your DAX code and here is the DAX code.

    Measure =
    IF (
        ISFILTERED ( 'Campaigns'[Sim ID] )
            && NOT ISBLANK ( MAX ( 'Campaigns'[Sim ID] ) ),
        1,
        0
    )

     

     

     

    Best Regards

    Yilong Zhou

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

    • mehlenbae2's avatar
      mehlenbae2
      Icon for Helper II rankHelper II

      Hi there,

       

      I tested this and it still does not work. I will attach a test PBI to this comment.

       

      Here are my requirements for functionality:

      1. The photo (Simple Image) should NOT show when nothing is selected in either the "Date" slicer or the "Sim ID" slicer.

      2. The photo (Simple Image) should NOT show if a value in the the "Date" slicer is selected.

      3. The photo (Simple Image)  SHOULD ONLY show when there is a value selected in ONLY the "Sim ID" slicer.

      4. The photo (Simple Image) SHOULD dissapear when a value in the "Sim ID" slicer is no longer selected.

       

      Attached is my TEST PBI. This is the exact format I have in my MASTER pbix file.

       

      Link: PBI: https://www.dropbox.com/scl/fi/poywqhwmi9bgjw6n5hrvw/TEST5.pbix?rlkey=cxy49gxbxw0dj5cjis2du9tod&dl=0

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi mehlenbae2 ,

        It seems that I can not open the .pbix file. Could you please change a way to upload the file?

         

         

        Best Regards

        Yilong Zhou