How to change dataview background based on cell content?

What I’m trying to do

I’m trying to change the background color of a cell, based on it’S content. Similar to Conditional formatting for Excel.

More precisely, my notes have the value “status” in their frontmatter (status: "foo" and status: "bar") I am looking for a way to make the cell’s background green if status: "foo" and red if it’s "bar".

Things I have tried

I know I can format the text, regardless of content with a html span element and the matching css, but I have not found a way to apply the conditions.

Try choice :slight_smile:

https://blacksmithgu.github.io/obsidian-dataview/reference/functions/#choicebool-left-right

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