Making Visualizations Interact

## **Introduction**

### **Why**

In the field of human-computer interaction (HCI), visual interaction is defined as the design of user interfaces for interactive systems that use visual elements and visual interaction strategies to support perceptual reasoning rather than tedious cognitive comparisons and computations referring to the introduction.

A conscious approach to the interaction between visual elements on the report page can have a significant impact on the overall user experience of the report. Power BI has two options when using filters and highlights, it's important to know when to use which.

### **What does it mean?**

Interactive visualization technology allows you to explore your data by manipulating graphical images that represent aspects of the data set analyzed for color, brightness, size, shape, and motion of visual objects.

If your visual has a hierarchy, you can drill down to see additional details. Dates are a unique type of hierarchy. Report designers often add date hierarchies to visuals. A typical date hierarchy is one that includes the year, quarter, month, and day.

One visual affects another

Adds more elements to a graph

Visual interactions change how visualizations on a report impact each other.

## **Types of Interactions**

Power BI has several built-in interactions which can be convenient to use in data visualization. It is crucial to know the function of each type, in order to use the interaction efficiently and purposefully. As a matter of fact, there are three different states of interactions; filters, highlights, and no-interaction. The slicer which is a type of visualization has a similar function, thus the slicer is added as a type of interaction.

### **Filters**

For some occasions, it is not necessary to show all the data of a database. Therefore, Power BI has the functionality to remove the data from the visualizations. This can be done on three different levels; report, page, and visual level, and can be found in Power BI Toolbar (see figure 1). Those levels have a certain hierarchy between them thus making customization between visualizations in the entire report more convenient. Besides, it is possible to use the DAX method to make custom filters.

Filter levels visible in Power BI from low to high hierarchy: Filters on this visual, filters on this page, and filters on all pages.

#### **Report level**

The first and highest level is affecting the whole report including other pages (marked in the figure as 3). Filters set on this level remove the data for all the visualizations in the model. It is important to notice that filters set on this level might lead to functionality problems when setting lower filters.

#### **Page level**

It is possible to create independent pages in your Power BI model when selecting this filter (marked in the figure as 2). For example, you could use this filter level for making multiple pages each with different timestamps. Although, filters set on the page level will not work properly if not aligned with the filters set in the report level.

#### **Visual level**

This level of filter is seen as the lowest on the scale of hierarchy. Setting filters on this level is only possible per visualization. The use of a filter on this level makes it possible to create a dashboard more precisely by using different timestamps or other variables within your page (filter is marked in the figure as 1).

### **Filtering types**

Each filter has different kinds of filtering types however, it may occur that visualization has multiple filtering types. Most of the time those extra types are self-explanatory thus we only focus on the fundamental two filters. The so-called 'basic filtering' and 'advanced filtering.

#### **Basic filtering**

This mode of filtering gives the user a list of options to filter on (see the figure on the right). The options given by this filter type are data values and can be not suitable to use as values for filtering. In this case, it is more convenient to use the advanced filter instead of the basic filter. Besides, it is possible to search based on certain values you want to filter on.

#### **Advanced filtering**

Another way of using the filter option is by selecting advanced filtering (see the figure on the right). Now it is possible to search for values based on rules instead of just inserting values. For example, you can use the rules 'greater than' or 'smaller than. The filter will remove data from the visualization based on the given value.

For example, to use the basic filtering feature follow the next steps: Step 1 is to check which level the filter will affect, in this case it is effective on only the visual level. Step 2 is to choose the type of filtering, here the basic type of filtering has been chosen. Step 3 is to select the data you want to keep.

### **Highlight**

Highlighting data looks in many ways like filtering data so it is important to know the differences. Filtering is about removing unwanted data while highlighting doesn't remove data but only focuses on a specific part of it. So in general filtering and highlighting are not the same but can be used together.

To use the highlighting feature, pick at least two visuals that have correlating data. In this example, the Bar Chart graphs sales and the Scatter Plot shows cost of goods sold and profits.

To highlight a bar, click on the specific bar. As shown on the image below, the April bar is clicked. This changes the scatter plot points to show the data from only April.

Another way to highlight is to click on a specific dot on the scatter plot. This will highlight only the information on the bar chart that correlates to the dot on the scatter plot. As shown below, only a portion of the June bar is highlighted.

    There is another way to find information that does not include highlighting. If you hover over a bar there is a pop up that appears. This pop up will have information about that bar. As shown below, the pop up shows the month and sum of sales for said month. Shown previously, the pop up also appears when highlighting data. This is helpful when using visuals like the scatter plot, where the information might be too small to understand.

### **Slicer**

By using a slicer you are able to add an additional element to a graphic that you wouldn't be able to have normally. A slicer provides buttons that the viewer of your dashboard can click to filter your graphics.

Once you have a visualization on your dashboard, see Introduction to Power BI: What is Power BI? for more information for adding graphics, you can add a slicer to add an extra element to filter your graph by.

Select the variable you would like to filter your graphics by. Drag this variable into the "field" spot.

Once you have selected the variable you would like to filter by you will now be given the option to select a specific value from the variable.

You should now have graphics that depict your selected value. All graphics on your dashboard should have changed to show data only for the data points that contain your desired value.

### **No Interaction**

There may be times when you do not want a graphic to be affected by a filter. Power BI actually has a feature that allows you to do that!

Once you have multiple graphics on your dashboard you can select the graphic you do not want to impact other visuals. This applies to highlighting and slicing. In this example the slicer is selected.

Once the visualization you not want to have an impact is selected. Go up to the task bar and select the "Format" option.

From here select "Edit Interactions". This will add a new tool to each of the other graphics. The new option will contain two new buttons where one can be toggles on at a time.

Now you can select the no interaction option the graphic you do not want to be affected. In this example we do not want the slicer to affect the line graph.

To demonstrate this, select an option on the slicer.

Now observe that when the slicer was used the line graph remained the same and the bar chart was the only thing that changed.

## **Importance**

Why do we make visuals interact? Making visuals interact with one another can illustrate different elements and emphasize importance about your data set(s). Building reports and having visualizations interact can help explain your data in a different way than you can vocally. You're more likely to share the report and the discoveries without having to further explain your point of discussion.

However, visualizations interacting can be a great self check. If you include too many interactions it can be confusing for your audience. Or it can lead to your audience having way too many decisions (think of the "choose your own adventure" novels). But having too little may not get the information out properly. Every data set will need a different amount and type of visualizations, and with that comes a variety of interactions. It's ultimately up to you to decide how many visuals and interactions you should include.

Just remember *there is a difference between providing freedom to manipulate the data and letting your audience have complete control over every data piece*.