Pass the action context in Filter Action

Hi All,

I have a bar chart with employee name on X axis and Score on Y axis. A “filter action type” has also been set on this chart so that it filters all other visuals based on the employee selected in bar chart. Now I want to show the employee name selected along with the titles in other visuals when this is done. How can I get access to the employee selected in the chart and use it to dynamically set the titles on other visuals?

Any help would be much appreciated?

@Philip, see the steps below to achieve your use case -
1/ create a parameter of data type string
2/ create a same sheet navigation action (source and target sheet should be same) on the bar chart that will set the parameter value to selected employee value, make sure to remove the same sheet filter action since filter action doesn’t set up a parameter value)
3/create a filter control and associate that filter control to this newly created parameter (from step # 2)
4/ As user clicks on a specific employee name in the bar chart, that will result into same sheet navigation and set that parameter value to employee name which will then apply as filter to all the selected visuals. see the screenshot with red highlights

5/ you can highlight the selected employee by creating a calculated filed as ifelse(${Segment}=Segment,“selected”,“others”) and use this field as part of the color field well as highlighted in blue in above screenshot. In my example, I am using segment field for selection.

Let me know if this helps in meeting your use case.

Thanks
Deepak

2 Likes

Hi @DeepakS

Thanks for the solution. Passing the context to a parameter and checking that inside the calculated field for highlighting was indeed helpful. However I have two more questions.

First Question:
Once I applied the highlighting in the bar chart the visual looks a bit odd. The individual bars in the chart are not stretching to its full width. Are there any settings to correct it? See the below images

Original one:

After highlighting:

Second Question:
How can I reset back to the original view? i.e see all employee details. Right now once an employee is selected that is highlighted but there is no way to reset the parameter by clicking any where outside.

Hi @Philip,
1/convert the bar chart to stacked bar chart that will allow bars to stack and extend to full width. This is so because regular bar chart is now creating space for both values (selected and others)
2/ To reset to original values, you can use the filter control that was included on the sheet and select all values that will then reset the parameter value and the selection on the graph

Thanks
Deepak

2 Likes

Hi @DeepakS

I am really grateful. Both the suggestions worked!! Thanks for your time and effort.

I missed the point that the created parameter should be made a control in the sheet with all the values so that it works back and forth with the chart and thereby resetting also works automatically.

1 Like

@Philip We are so happy to hear that this has been resolved for you! Great work @DeepakS!

In my case, i need to have a filter action on Vertical bar chart for the Values but the action has field scope only the x axis and not the values as attached. same is the case for the table. Action is applicable only on the group by parameter or x axis parameter. What is the option for my requirement

Hi @srinivasan_ab,
what about using a navigation (to the same sheet) action with parameters?
Besides as the original topic is already closed, could you please create a new one?
BR

Hi @ErikG , Thanks for your suggestion. I have tried creating a new navigation action with a parameter but since it’s grouped based on location parameters only it is getting clicked or highlighted. I have created a new thread for the same.