1

How to bring up a second filter/slicer when selections are made in the first one?

In a recent Question on the Q&A Section from Rory Sinclair we got asked: 
How to build the report so that choosing a particular selection in a slicer in a present brings up a secondary slicer based on a different dimension.  He wanted to filter by the second dimension for a particular selection in the first filter.

This is the Solution:

It is possible, but needs a bit of Configuration.  Effectively, we are wanting to perform conditional content display. I.e., as you say, only display items under certain conditions.

To do this, we can use the "Mini-Tab", the Present object that allows you to create tabbed content. In our case, we're going to hide the tabs and the object's border and panel, rendering it invisible, then drive the tab selection based on the value of the initial slicer, the selected tab containing our second slicer and the other tab, nothing.

First create your two slicers and our mini tab, with two tabs defined:

Drag and drop the second slicer, in our case, Product Category, into Tab 1.

Select Tab 2, to make it the default, then hide the Tabs:

Make the border zero width:

Select the first slicer, right click and select "Actions":

We need to choose the mini-tab we're jumping to and the "Advanced" option. We can then examine the value of the selection from the first slicer using the Captions() function. If it is the value that should display the second slicer, got to tab number 1, if not, number 2)

At run time, the default selection is Acme and the default tab is Tab 2, so the second slicer is not displayed:

Selecting "Poomah" also initiates the Jump Action and as Captions() = "Poomah", Tab 1 is displayed and the second slicer becomes visible and can be used. If the first slicer selection is changed to anything other than "Poomah", then Tab 2 will be shown and the second slicer will not be visible.

Of course, with additional Tabs and Slicers and by making more sophisticated logic in the Jump Action, many permutations of slicers (and other content) can be conditionally displayed based on user selection.

Bear in mind though, that if you conditionally display the slicer, make a selection to filter something, then conditionally hide it, the filtering will still be in place.

 

 

 

 

 

 

 

4 replies

null
    • Consultant
    • Rory_Sinclair
    • 3 wk ago
    • Reported - view

    Thanks for this, Ian. 

    I must have missed this at the time you posted, but found the topic looking for an answer on a similar but slightly different use case (will be using the tabs to expose some navigation buttons that should be hidden for slicer values to which they do not apply). I think this may work with a little adaptation, will give it a try! Funny that I missed it at the time but it's now come in useful a year later. 

    All the best,

    Rory

    • Consultant
    • Rory_Sinclair
    • 2 wk ago
    • Reported - view

    Hi

    I'm working on my variant of this and wondered if you might be able to support with a problem. To translate the problem to relate to the example you showed, what I'm aiming to do is to essentially have a button for each of Accessories, Bikes, Clothing and Components. I would then like to conditionally show/hide the button using this mini-tab approach. but the logic should be based on whether each category is applicable for the selected manufacturer. E.g. If [Acme].[Product Category] contains Bikes and Clothing, the mini-tabs for bikes and clothing should be switched to tab 1 while Components and Accessories should be switched to tab 2 (blank) when Acme is selected in the slicer. 

    Do you think this is possible and/or the right approach for something like this? 

     

    Thanks in advance,

    Rory 

      • VP Product Management
      • Ian_Macdonald
      • 2 wk ago
      • Reported - view

      Hi  ,

      Your explanation is a little confusing. Can you try again and maybe my feeble brain can understand what you are wanting 🙂

      Thanks,

      Ian

      • Consultant
      • Rory_Sinclair
      • 2 wk ago
      • Reported - view

      Hi , 

      Sorry about that. I managed to get this working but I'll explain anyway as you might have alternate suggestions for a simpler/neater way to achieve the same thing in future. 

      Essentially, I'm creating a dashboard where the user can navigate by selecting an organisation they are interested in on the cover page. Then, a series of icons which link to subsections of the report should either light up or be greyed out depending on whether they are applicable for the selected organisation, as only some subsections of the report apply for each specific organisation.  The applicable ones should be clickable and link to the relevant report section.

      My solution was to: 

      1. Create an additional table in the model derived from the base data, which just contains a list of Organisation and Report Subsection, showing which sections apply for each org. 
      2. Create the slicer for organisation in the dashboard
      3. Create a second linked slicer for the subsection, set to multi-select with a default selection of all. This is filtered by our organisation slicer, so, when a user picks a particular organisation it will return all of the applicable sections for that organisation as selected elements.
      4. Create the icons in mini tabs, with tab 1 containing the icon, and tab 2 containing a greyed out version to indicate that it's not applicable
      5. Add an action for each button to the Report Subsection slicer which alters the mini-tab display, containing:
        If((Contains(Captions(),"Subsection relating to button")),1,2)
         So it switches the tab to the active (1) button, or the greyed out version (2) depending on whether the subsection name matching the button is displayed in the slicer selection.
      6. Add the jump to page actions for each button in the mini-tabs to take the user to the corresponding section, and hide the second Report Subsection slicer on the page so that the user just selects an organisation and the derivation of the related subsections happens in the background. Inject 'Organisation Name' slicer value to target on the action, so our link will show the subsection of the report for our selected organisation only.

      Hope that makes sense. It worked, but it does seem a bit involved - there may be a simpler route I could have taken to achieve the same end result. 

      Thanks,

      Rory

Content aside

  • 1 Likes
  • 2 wk agoLast active
  • 4Replies
  • 110Views
  • 2 Following