The value which you are selecting at the filter level is getting passed inside the dynamic view. Now you are selecting ‘_ all _’ at the report level and that is getting passed inside the dynamic view and that is a correct behavior.
Now in order that when ’ _ all _ ’ is passed you have to add an additional or condition in your dynamic view so that when this value comes it will bypass the filter. You can refer to the below code wherein we have added one more OR condition and checking that if the filter value is selected _ all _ then _ all _ becomes equal to _ all _ and thus that filter gets bypassed.
Sample code :
return "select divisionid,month,year from primary_sales_data where ('_all_' in ($filter_divisionid.value) or divisionid in ($filter_divisionid.value))"
return "select divisionid,month,year from primary_sales_data"