Hiding tags in dataview

What I’m trying to do

Hi! I’m new to Obsidian’s dataview plugin. I have a dataview query that outputs any incomplete tasks from my vault that includes #P2 and #Todo tags. Now, I am trying to hide the tags in the output of my query, so I would only see the tasks that I need to do.

Things I have tried

Below is my current query:

TASK
WHERE !completed
AND contains(upper(text), "#TODO")
AND contains(upper(text), "#P2")

SORT contains(file.tags,"P2"), text ASC

All answers are appreciated. Thank you for your help! :slight_smile:

If you want to replace all tags you could do something like the following

```dataview
TASK
WHERE !completed
AND contains(upper(text), "#TODO")
AND contains(upper(text), "#P2")
FLATTEN regexreplace(text, "#\S+\s?", "") as visual
SORT contains(file.tags,"P2"), text ASC
```

If you want to replace just a few tags, other variants of this replace could be used, i.e. regexreplace(text, "#(ToDo|P2)\s?", "") which isn’t case insensitive though.

This works very well!

Thank you so much!

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