Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Conditionally display a visual based on a measure's value (no slicers or user interaction involved)

Hello.

 

Is there a way to show/hide a visual (a card, table, matrix) when the report is launched, based on the value of a measure. This does not depend on user interaction, such as using a slicer (my report won't have any).

 

In the sample report attached, if the measure's value = 1 I want the card to be hidden, else displayed. The "Show items when the value" option is disabled.

 

 

 

Thanks.

  • Anonymous 

     

    power bi doesnt support this as far as i know .

    added to this, you can't add a measure to the filter pane for kpi visuals. 

     

     

    what you can do, is in the dax code

    check if your measure returns certain value  , then blank() , else , [ your calculation] 

     

    drag and drop this measure to the visual.

     

    although this wont hide the visual, but the visual will show no data when your condition is met .

     

     

     

    If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. I would appreciate hitting that kudos button 👍🤠

1 Reply

  • Daniel29195's avatar
    Daniel29195
    Icon for Community Champion rankCommunity Champion

    Anonymous 

     

    power bi doesnt support this as far as i know .

    added to this, you can't add a measure to the filter pane for kpi visuals. 

     

     

    what you can do, is in the dax code

    check if your measure returns certain value  , then blank() , else , [ your calculation] 

     

    drag and drop this measure to the visual.

     

    although this wont hide the visual, but the visual will show no data when your condition is met .

     

     

     

    If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. I would appreciate hitting that kudos button 👍🤠