1

Tip of the Day - How to build a slicer that reflects hierarchies

How to build a slicer that reflects hierarchies

In today's tip, we are looking at a special use case around slicers. How to adapt them to reflect a hierachy that is used in the report. 

So lets imagine we have a dashboard where we are using an action at the Hierarchy level. We’d like for the slicer on the destination to be updated to reflect what element of the hierarchy is selected for the action.

The slicer we want to use at this destination also needs to be a different slicer type (i.e. single select) than the slicer of the same field on the starting page (multi-select). 

How do we implement this: 

  1. Setting up 2 separate Presents, and using a “Jump to URL” Action 
  2. Referencing a Target in the Action URL. 
  3. Using a slicer at the level in the hierarchy we want the action on. 

Create the Present

On Present 1 we have a matrix grid using the Products Hierarchy (Product Category > Product Subcategory > Product). ,

 Access the Slicer Settings

 and make sure the slicer is set to the ‘Product’ level.

 Now create a target that interacts with the slicer. 

Setting up the Action: 

We want to use a “Jump to URL” on the Products Hierarchy that we are using in the matrix grid in Present 1. The URL you use should be the direct URL to whichever Present you are jumping to, plus the target values you want to dynamically give to the slicer on the second present. In the example above, it looks like: 

“URL&target[Product]=” + UniqueNames(dataset(“[Products].^[Products Hierarchy]”))

We use target[Product] because we are using the Product level in our slicer. We use the UniqueNames(dataset( portion because that is the data we are using for our action. 

In Present 2, we have another, more detail-level grid that we want to view for one Product at a time. 

We do the same thing by setting the slicer at the Product level, but this time make it a single-select drop down. 

Since we are navigating to it, the initial selection/default value is not as important. 

 Now we open up Present 1 and locate the product that we want to jump to:

 This way we generated a link to an addition more detailed report.

 

Read more about Actions on our Help Pages and take the Course in our Learning Hub.

 

Still got questions or want to give us a thumbs up. Leave a comment below the Article.

Reply

null

Content aside

  • 1 Likes
  • 2 mths agoLast active
  • 74Views
  • 1 Following