Quick Summary

When designing a dashboard in Qlik Sense, you should think about explicit filters and other objects that can be easily used to make selections in the data model. However, the standard filter pane can sometimes be a bit boring or you simply want to spice things up. Obviously, I am not talking about shiny, rainbow-colored unicorns that will sing every selection you make, but there are other ways to create simple, intuitive, and engaging filters. (Don’t get me wrong, if you manage to do the unicorn thing in Qlik Sense, be sure to let me know. That would be awesome! 😛)

Requirements

  • Metrics: 0
  • Dimensions: 1
  • Chart Type: Button

More information on how to use buttons in Qlik can be found here.

Starry Filter

The button chart (available from version February 2020) brings a lot of new possibilities to the navigation schema in our dashboards. You just have to use the ‘Select values in a field’ action and be a little creative. For example, take a look a this app and use the stars above the table to select different ratings:

Filter Creation

First, we are going to generate some sample data using an INLINE load. Let’s also add some stars to represent the ratings using the repeat() function:

Ratings:
LOAD *, Repeat('★', Rating) as [Stars rating] INLINE [
Rating, Reviewer
5, Presley Coates
5, Alessia Goodwin
5, Alec Keith
5, Ellis Webster
4, Katy Mccormack
4, Brielle Glass
3, Vanessa Bouvet
2, Keanan Cousins
2, Kelise Hamer
1, Allen Grimes
1, Antonina Bentley
1, Pheobe Hawes
];

Filter Setup

Now, we will create 5 button charts triggering specific selections in the Rating field. We will also alternate the ★ and ☆ symbols based on values selected. But don’t get nervous, let me explain it step by step:

1. Create a new variable called vColorStars.

=If(GetSelectedCount([Rating]) = 1, GetFieldSelections([Rating]), 0)

2. Create a button object.

3. Go to Actions and navigation > Add Action > Select values in a field. In Field, select Rating and in Value type =1.

4. Next step: go to Appearance > General > Label and type this:

=If($(vColorStars) >= 1, ‘★’, ‘☆’)

5. Now, go to Appearance > Font styling > Font color and choose any color you like (or simply select By expression and use =’#e9c46a’ if you want to keep the classic yellow stars.

6. Finally, go to Appearance > Background and change the color once more. If you want to use a transparent background, just type =ARGB(0,0,0,0).

We just created our first object, which will select all 1-star ratings. Go ahead and copy this object 4 more times. Just change the 1 from step 3 and 4 to 2, 3, 4 and 5 for the rest of the buttons. 

Hopefully, everything went well and you now have your own starry filter. Nice!

Article Resources

Some of you might be interested in downloading the example app. You can get it here:

There are many ways to use the button chart for making selections! I will be happy to hear what you have to say about this topic. Feel free to suggest any improvements or modifications to this approach in the comment section below!