Applying a filter across multiple dashboards.

I have a series of dashboards whose metric sets have a common slicer - Customer. I would like to have a single filter on one page that will apply that filter to the other dashboards.


The scenario is that a salesperson can log in and choose what customer data he/she wants to analyze. Then each dashboard that is viewed will have that customer's data.


This could be done either in the default view that the user sees after logging in, or in a template that all of the dashboards use.


Is there a way to do this?


Thanks,
Matt

How many dashboards do you have? if it's less than a handful, I would recommend setting a single dashboard with layers where each layer is used for the different dashboards you planned to have. You can then have a single customer filter that is attached to all of your layers. To switch between layers, you can have buttons or any other component to help the user navigate through the layers. An example for such is a setup is available under this public sample (click on smoking and drinking to switch layers). This will make the filter binding easy across all the different layers (dashboards). The down side of this approach is if you have many dashboards and then managing many layers within 1 dashboard can get complex and also if you need to land directly on one of layers (dashboards) as then you would also need a parameter that will save which layer is visible or not. If those are not concerning you and you are new to layers and want to follow this path then you can learn more about layers and a sample setup under here.



Otherwise, it depends of your expected UX. for example, if you expect the user to always navigate from one dashboard to another by clicking on a button (or any interaction) from within the dashboard (in oppose to use the Dundas BI open menu and navigate from there) then you can simply pass the selected customer as part of that interaction (navigate) setup.



However, if you expect users to be able to navigate directly without going through an interaction within another dashboard, then you can achieve this by storing the customer filter selection in the global window object and then apply it on every loaded dashboard. This will require a bit of JavaScript to both read the selected filter value on the source dashboard and then store this value in the global window object (I would place that script that reads and stores the value on the filter control “parameter value changed” action of the source dashboard) and finally, apply the stored value on the “ready” action of newly loaded dashboard to the filter control (view parameter( on that dashboard. To set filter values follow this.



Thanks. The javascript route is probably where I'm going to have to go since there isn't any direct navigation. I've tried your suggestion with a test dashboard and it seems to solve my problem.

Hi Matt,

if I understood right, you're searching something like this below.
Hope, this helps.

Kind regards,

Thom


// FYI: Put as required all the code including the set/get functions into the Dashboard.Ready() event, a Filter.ParameterValueChanged() event, or into a Button.Click() event etc.

// Set Customer________________________________
setCookie("currentCustomer", "Darth Vader", 2);

// Alternative: Set Customer based on the a filter selection
// setCookie("currentCustomer", parameterHier1.control.parameterValue.values[0].uniqueName, 2);



// If you want to get a Customer Name and assign it to a hierarchy control___________________
/*
var chCustomer = getCookie("currentCustomer");

var myParameter1 = this.control.viewParameters.filter(function(item) {
return item.name === "viewParameter1";
})[0];

var filterValue1 = new dundas.data.MemberValue({
hierarchyUniqueName: "CustomerID",
levelUniqueName: "A.CustomerID",
// !! Check, if the (security) attribute "A." is set/defined right !!!
uniqueName: chCustomer
});

myParameter1.parameterValue.token = null;
myParameter1.parameterValue.values.length = 0;
myParameter1.parameterValue.values.push(filterValue1);
myParameter1.invalidateParameterValueLastModifiedTime();
myParameter1.refreshAllAdapters();
*/



// Cookie Settting Function Definitions _____________________________________________________
// Of course, instead of the event these could (should?:)) be separately defined in a library

function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + "; " + expires;
};

function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0)==' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length,c.length);
}
}
return "";
}