I am having trouble using the filter command. In this picture I have a runs.summary of one of my uploaded tables, I see that a .filter command exists but I haven’t found a good example of the syntax required to use it. I have a column named category that defines whether each row represents a baseline, statistical, or ML model. I would like to be able to filter by these categories.
It would also be helpful if I knew how to filter by this column when creating a custom chart, but I’m not sure if this is possible.
Hi there,
Thanks for your question and sorry you weren’t able to find a solution in our docs.
That is a “Weave Expression” and you can filter it with this command: runs.summary["table"].table.rows.concat.filter((row) => row['<column>'] == '<something>')
where and are the values you want to filter by.
Some caveats:
This is already filtered to show the runs that are selected in your workspace.
This is limited to the first 50 runs in the workspace
You can filter runs in your workspace using the icon or using the filter button above the run names
You can also filter the table by clicking the filter button ▼ in the top left of the panel and typing row['<column>'] == '<something>'
Sorry, I was incorrect above. run.summary['table name'] is actually a list of Table files under the hood so you can’t filter using it’s contents directly.
To filter using it’s contents, you can do: runs.summary["table name"].table.rows.concat.filter((row) => row['column name'] == 'something')
We’re actively working on improving the UX and documentation of this, thanks for your patience.
Hey @svedder! You can filter Cusom Charts by modifying the Vega spec. Here you have their official docs. You need to click on Edit and then add the filter to the spec as shown in this screenshot
And you can create a new preset by clicking on Detach or save the existing preset by clicking on Publish changes. Please let me know if this is helpful!