Adding slicer to every visualisation

We have a client who often wants to add filters to their large project. This involves us having to go through every visualisation on every layer on every dashboard and add the same column to the slicers section.

Is there a script that can do this, or is it too complicated to bother with?

It would be a great feature to have as this is something we often need to do - to add a specific column to every visualisation as a slicer.

Hi, in this case you can consider adding the slicers manually and then using ‘Check similar option’ to connect the slicers to the viewparameter - https://www.dundas.com/support/learning/documentation/create-view-content/filters/check-similar-parameters-in-a-view

Thanks @upasana, I make heavy use of that feature (which usually works), or the search function and then check all (which always works).

My question was specifically about adding the slicers to each visualisation.

1 Like

You can certainly use the server APIs to add the slicers programmatically then save the metric sets, but you probably want to accomplish this from the UI with some Javascript code. Unfortunately, currently DBI has no such feature out of the box.

To expand upon what Adran briefly mentioned, you would need to use the DataCubeService or NativeStructureService entity depending on if if you are using our Data Cubes or a native OLAP structure like SSAS. Then you can get the specific dimension that you want to add to a Metric Set. On that front, the MetricSetService can be utilized to get a specific metric set and modify it to add a new dimension as a slicer.

Something to be aware of here is how to retrieve their Metric Sets in the case you are wanting to update many at once - one option is to add all the Metric Set to a dashboard and run the script from that Dashboard. Other things that should be kept in mind are to make sure those Metric Sets are checked out and that they don’t already include the dimension you are attempting to add.

It’s certainly doable, but it can be complex, so if you need more of a deeper dive or an involved guidance, I would suggest engaging our professional services team as they are best equipped to handle this.

1 Like