3

Is there a way to use a card as a slicer/filter in Power BI?

My report has two cards, "students_eligible" and "students_attended", as well as a table below them. I want to filter the table based on the cards. Meaning, if I click on the “students_eligible” card, then the table should only show the data related to “students_eligible”.

How can I accomplish this?

I’ve included an image below for context.

Attached Image

Matt Kocak
  • 736
  • 2
  • 6
  • 25
Akash Raj
  • 39
  • 1
  • 1
  • 5

3 Answers3

4

There is no direct method of using a Card as filter, you can't set it as one or assign a bookmark to an action on it. What you need to is create for example a shape that sits on top of the visual, turn ofs the fill, background and boarder options, just to leave a transparent shape:

Shape options

Then create two bookmarks, one with a filter for Students Eligible, and the other for Students Attended. You may have to create a third bookmark assigned to a button or other object to return to 'No filters'.

Assign the bookmark to the shape object and ensure that it is on top of the visual. So when the use no clicks on the card, it will click on the shape, which will then filter the page based on the bookmark.

enter image description here

You can if you wish, just use the Bookmark buttons rather than click on the card object, which may be better from a user point of view

Jon
  • 4,593
  • 3
  • 13
  • 33
  • If you are new to Power BI, bookmarks are a good topic to learn. They really elevate dashboards in an intuitive way. +1 – user9824134 Apr 27 '21 at 16:18
1

Cards are not clickable by itself.

You can create a bookmark that holds data for the slicer value you want to choose. Also, create a button and add this bookmark to the buttons action property.

Place this button over the card and make the button completely transparent using the background and fill properties.

This provides a user experience of clicking on a card to filter

Rajesh
  • 766
  • 5
  • 17
1

I recently developed the Slicer Button custom visual that allows one to use a card as a filter (more specifically as a "slicer"). Using a bookmark has some drawbacks and this custom visual allows a card to be used more similarly to a slicer visual.

Slicer Button Demonstration

Below if a YouTube video demonstrating how to setup and use the visual as well as a link to the GitHub repository.

Basic Setup & Use: https://www.youtube.com/watch?v=8x2QoE8M2yA&ab_channel=MattKocak

GitHub Repository: https://github.com/mattkocak/powerbi-visuals-slicerbutton

I'm happy to clarify anything that's unclear regarding the visual. I also have a blog post on the topic titled Turn your cards into slicers with the Slicer Button custom visual.

Matt Kocak
  • 736
  • 2
  • 6
  • 25