Forum Discussion

DanielCarvalho's avatar
DanielCarvalho
Icon for Helper III rankHelper III
3 years ago

Hide a card visual based on slicer selection

Hi,

 

I usually have a measure similar to this in order to then put it on the filter to hide a visual:
HideVisual = IF(SELECTEDVALUE('CALENDAR'[Period - Current]) IN {"Current"},1,0)

or like this:
Hide Slicer = INT ( SELECTEDVALUE('CALENDAR'[Period - Current]) = "Current" )
When I try to this for a card visual, once I drop it on to filter its greyed out and it does not work... Does anyone know anyway around this? Basically what I want is when the current period is selected on my slicer, for it to show a certain card that does not show in all other periods(months)

 



3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi DanielCarvalho ,

     

    As the Card dispalys only one value which has been aggregated always, we are not able to add a filter condition based on this aggregate value ("Average of Values").

    When the specified fields under Visual level filters pane contain more than one value, then we can set filter condition like yellow highlighted section via Advanced filtering. Take a look at this article: How to use report filters.

    I think you can just create a measure to show the result when you select the slicer.

    HideVisual =
    IF (
        SELECTEDVALUE ( 'CALENDAR'[Period - Current] ) IN { "Current" },
        [Card visual calculation like sum],
        BLANK ()
    )

    Or you can create a bookmark to hide the visual.

     

    Best Regards,
    Rico Zhou

     

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

    • DanielCarvalho's avatar
      DanielCarvalho
      Icon for Helper III rankHelper III

      what would i put where you said card visual like sum??? and where would i apply this measure and how??'

  • KeyurPatel14's avatar
    KeyurPatel14
    Icon for Responsive Resident rankResponsive Resident

    Hello Anonymous ,
    Can you please explain how we can achive this with the help of bookmark with slicer selection?