Pass multiple filters or Dashboard Variables to Drilldown report

Hello Team,

I have a dashboard in which there are multiple filters/ parameters like – date, customerName and location. I have a pie chart which shows the closed sales vs pipeline. I want to drill down on this report. But, the drill down report should open with filtered values of the other filters of the dashboard also.
For example, if the user selects customerName=A and location = X then the drill down report should show the values only for customer A and location X. When I am implementing drilldown, it is not filtering this data, its only filtering the portion of pie I had clicked on. Hence only one filter is getting passed and not the other filters are getting passed. How do I pass the dashboard input parameters as filter parameter to child report?

Thank You

1 Like

Hello Widideh,

For passing the input parameters on the dashboard to the child report, you need to pass the values of dashboard variables in the URL of the child report along with the parameter from the chart.
For this, at the report level in the JS Editor, use the below given script. Here what we have written is that we have specified the dashboard variables and on-click even the child reports opens. All the multiple dashboard variables gets added to the child report in URL so that it shows data for all the filtered value. Herein we are referencing Dashboard.getVariable and this API only works at dashboard level, so when you use this at dashboard you will see:

hi_container.set("preExecution",function(c)
{
	var viz_Options = c.get("viz_Options");
	viz_Options.chartOptions.data = 
		{
		onclick: function (d, i) 
			{ 
			var start = Dashboard.getVariable('StartDate');
		    var end  =  Dashboard.getVariable('EndDate');
		    var users = Dashboard.getVariable('userstats_UserID');
			var lead = d.name;
			window.open(window.baseUrl+"?dir=1580286161890/1580286586884/1580286633025/1595799484871&file=92b61fc2-ea68-4c5b-afff-8f32c09d7688.report&mode=dashboard&LastUpdatedOn_Startdate=["+start+"]&LastUpdatedOn_Enddate=["+end+"]&SalesPersonID=["+users+"]&LeadQuality="+lead+"",'_blank');
			}
		};
	c.set("viz_Options",viz_Options);
});

Replace the variable names in the above code with the variable names that you are using on your dashboard.
Also, the above code will open the child report in new tab. If you want to open it in the same frame, replace β€˜_blank’ by β€˜_self’.

Thank You
From Team Helical