redash
redash copied to clipboard
Pivot table "only" filter is fragile when query result grows
Issue Summary
The built-in filter tools of the pivot table let me choose to display "only" one filtered value. But dimensions that I filter this way break if more unique dimension values are added to the query result. For example: assume my pivot table has columns a, b, and c. I choose to filter and only show column b. If I rerun the query and now records exist that would make a d column, my pivot table will show columns b and d. This happens because d was not present in the results when I filtered initially. Which isn't intuitive. I expect the "only" filter would continue to apply as long as the specified value was part of the query result.
Steps to Reproduce
I reproduced this on the preview instance. Screenshots of the behavior appear below.
- Visit the preview query here.
- Change
Values to excludeparameter fromload_favoritestoNA. Click execute. - Observe that the pivot table shows
loginevents andload_favoritesevents.
Full reproduction steps:
- Make a query that generates a pivot table with at least two columns
- Configure the pivot table to show "only" one of those columns.
- Re-execute the query in a way that would introduce another column
- Observe that the new column appears alongside the column picked in step 2.
I did this using Redash events metadata by purposely excluding load_favorites events. When you change the parameter to exclude NA (blank) events, load_favorites appears in the query result and throws-off the filter.
Excluding load_favorites

Permitting load_favorites

Technical details:
- Redash Version: v9 Beta
- Browser/OS: All (FF/Chrome/Safari/Edge)
- How did you install Redash: SaaS
me too!!!
Oh, this is SO annoying, please fix it. :(