Forum Discussion

michaelb's avatar
michaelb
Regular Visitor
5 years ago

Filtering Based on a Parameter

Is it possible at all to filter a report based on a parameter that can be changed, or at least set at load time for an embedded report?

 

We are using embedded reports and need to be able to pass a parameter of some sort to control filtering on certain visual elements. The use case is that when someone loads the embedded report they should only see their own data. However, this needs to be on a per-visual basis, as some visuals should still be able to access data from everybody (such as my sales in one visual vs everyone's average in a second visual). Some visuals will use the filter and some will not.

 

We've tried adding calculated columns that reference a what-if parameter, however since the columns are only calculated once at load-time they will always be blank and will not update if the parameter gets changed.

We've tried adding additional measures that reference a what-if parameter, however these only work at aggregate level and cannot be used as row filters.

Row-Level Security will not work in our case, as we have multiple datasets with the same schema. Different groups of users will get different datasets, and its not feasible to set this up for every user in every dataset.

One possible solution we have found is that using the JavaScript API for embedded reports it is possible to list all visuals and set filters on them in script. This could be used to add the appropriate filters to the relevant visuals, however it seems the report has to fully load before the list of visuals can be returned. This is not ideal because the user will briefly see the unfiltered data before the filter gets applied.

 

Ideally we would be able to reference a parameter when setting up filters such as a basic filter for "[column] is equal to X" where X is the parameter and is settable via JavaScript API. Dynamic columns that update when a referenced parameter is changed would also work.

5 Replies