Grid Filtering with custom conditions