We are facing issue with the the Pre-filtering of the tableau workbook. We have written code in the same as mentioned https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_concepts_filtering.htm#apply-filters-before-loading-the-visualization.
When we are applying the filters before loading the visualization, filters are getting applied globally, I mean there are some sheets where filters are not applicable but still those sheets are getting filtered. We have checked the workbook and all the filters have been setup correctly.
When we are applying the filters after loading the workbook, they are getting applied correctly.
Can anyone help with this issue?
Hi Waseem, yes this is as intended. You cannot specify which sheets a filter should apply to when you apply filters before loading the workbook. Therefore, whether it applies or not, whether it is on the worksheet or not, filter2 will get added to ALL worksheets when you filter before loading. The option to apply filters before load is global and not worksheet specific. If you only want filter2 to get applied to sheet1 and not sheet2, you need to filter after loading with sheet1.applyFilterAsync().