Dataview remove result from column

What I’m trying to do

Hey everyone,
im doing a pretty basic search like this

TABLE Type as "Type", Genre as "Genre" 
FROM #films

what I would like to do is omit certain results from the genre colum, but not omit the entire row. as an example if there is a movie , with a genre called “action-comedy”, I would like for every in the genre column to be displayed except “action-comedy”.

I had a look through the docs but i couldn’t figure out if its possible to edit columns? Im sure theres a way to do it with dataviewjs but im not super comfortable using that and I figured i’d get sent in the right direction from here

1 Like

By the looks of the docs you could try to use

TABLE Type as "Type", Genre as "Genre" 
FROM #films
WHERE genre != "action-comedy"

I attached the files I used to test it with

Movie (87 Bytes) Movie (81 Bytes) Test (98 Bytes)

This hides the movies with the genre action-comedy altogether from the results. OP wants to just hide this genre from displaying in the column while still showing movies with this genre.

I’m confused sorry. Then why show the Genre column?

1 Like

Instead of filtering rows in the table, they wish to filter the column values. Say a movie returns this for genres

  • Action
  • Comedy
  • Romance
  • Romantic comedy

Perhaps I wish to hide romantic comedy here since it’s redundant and takes up more space in the table. But I do want the movie to remain with this genre.

1 Like

thanks for for the try @hiltonmeyer but I meant what @Rishi said .
Maybe using movies was a bad example, but I was just looking for an easy to understand one. there are times when I’m making large data queries, and things are coming back with tags that I dont need. like maybe I want to review my tagged notes. I want everything tagged with #literatureNotes so I can see any potential tags I’d like to add on to pages, but I dont need it to return the value #note. you feel me? theres tons of use cases where It would be nice to exclude results from columns, but keep the row

Checkout the Showcase post about the newly released DataviewJS where we can write any arbitrary JS to filter or sort the column after fetching the rows. There are some examples there which could get you started, this should very much be possible.

thanks I’ll take a look!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.