17. Context awareness

Analytics+ allows you to add additional information to your reports with its commenting feature. When you enter comments, the visual is unaware of the context - which can be set by a filter or a slicer in the report. In the image below, notice how the comment for the ‘Consumer’ segment is still visible even after the segment has been changed to ‘Corporate’.

Incorrect comments are diplayed when the slicer option is changed

With the Inforiver Analytics+, you can implement context-aware commenting in your Power BI reports in just a few clicks. As you apply filters, the comments will change dynamically. Follow the steps below to configure filter-context measures in Inforiver.

The steps to configure filter context are the same for charts, cards and tables.

Step 1: Create a Filter-context measure

There are two ways to do this. One is to write the DAX measure yourself. The second way is to let Analytics+ automatically generate the DAX script for you to use. The steps below outline how to leverage Analytics+ to create the DAX measure.

1.1. After creating your chart, click the filter context button at the top of the toolbar.

Filter context button

1.2. Enter the filter categories for which you want to capture the context. You need to provide both the category name and the corresponding table name from the data model. Click on the Generate button.

Click on the info icon to view the steps involved in setting up filter context.

Enter the categories used for filtering

1.3. Analytics+ will generate the DAX based on the categories you entered in the previous step. You can copy the DAX to the clipboard using the copy icon.

Copy DAX to clipboard

1.4. Use the DAX to create the filter context measure in a relevant table.

New filter context measure created

Step 2: Assign the filter context measure to the Analytics+ visual

2.1. Assign the measure we created in Step 1 to the ‘Tooltip - Text Categories’ visual parameter.

Add the filter context parameter

2.2. Click the filter context button. Notice how the interface has changed after assigning the filter context measure in the previous step (2.1.)

Select the filter context measure from the Context Measure dropdown. Using the toggle controls, you can enable/disable context awareness for comments (Annotation) and conditional formatting.

Enable filter context for annotations and conditional formatting

With the above steps, Analytics+ will be aware of the filter context. All your annotations and conditional formatting rules will now be tied to this context and updated in response to context changes. 

In the gif below, notice how the comments change dynamically based on the slicer selection.

Context aware commenting

1. Context-aware conditional formatting

You can use filter/slicer selections to drive conditional formatting. After setting up context awareness, you will be able to select the dimensions used in the slicers/filters from the conditional formatting interface.

We have not added the Category and SubCategory as visual parameters in the example. However, as we have set up filter context, both dimensions can be selected from the dropdown.

Filter context dimensions for conditional formatting rules

Conditional formatting rules are applied based on the filter/slicer selection.

Context aware conditional formatting

2. Context-awareness for measure headers

After setting up context awareness, when you double-click a measure header, Analytics+ will display the list of filters. Let's see this in action.

Filter context for measure headers

You can append a filter name to the measure header - the filter selection will then be dynamically displayed in the measure header. To view suggestions, press ctrl + space.

Context awareness in the measure header

3. Context-awareness for axis categories

Slicer selections can also be reflected in your axis categories. If you need context-aware axis categories, remember to enable the Axis label toggle when you set up context awareness:

Setting up context aware axis labels

You'll notice a Filter context tab under Canvas settings after you configure context awareness.

Filter context settings tab

You can select a measure and tag it to a filter context dimension. Please be mindful that the measure-dimension mapping is 1:1, i.e. you can map one measure to one slicer dimension.

Tagging a measure to a filter context dimension

In this example, we've mapped the Sales measure to the Segment dimension. Watch how the axis categories change based on the slicer selection.

Context awareness for axis categories

4. Context-awareness for measure group headers

Display the slicer selection in measure group headers. Select the slicer category to display in the header from the dropdown when you create the group.

Appending the category to the group header

Notice how the group header changes in response to slicer selections.

Context awareness in group headers

5. Context awareness for storyboard textboxes

Storyboard textboxes are context-aware! The content in the text boxes will respond to changes in Inforiver SuperFilter selections. In this example, notice how the summary and the KPI metrics change in response to region selections.

Context awareness for textboxes in storyboard

Last updated