18. 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

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

Context-awareness for measure headers

After setting up filter context, 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

Last updated