I need help with a simple function. This function is taken from a Tableau API example.
function yearFilter(year) {
var sheet = viz.getWorkbook().getActiveSheet();
if (year === "") { sheet.clearFilterAsync("Academic Year");
} else {
sheet.applyFilterAsync("Academic Year", year, tableau.FilterUpdateType.REPLACE);
}
};
It does not work with a dashboard. I get the following error message:
TypeError: sheet.applyFilterAsync is not a function. (In 'sheet.applyFilterAsync("Investment", investment, tableau.FilterUpdateType.REPLACE)', 'sheet.applyFilterAsync' is undefined)
How do I modify this function to work with a dashboard.
Thanks
Become a Viz Whiz on the Forums! Support the Community and master Tableau.