Replacing text values

Hi, I'm trying to replace certain text values in a column. I'm using the Modify column function but it's changing all values in the column, not the specific ones I need to replace. In this column, some rows contain the value "X". Only those values should be changed to "Y". So I've used the expression replace("X", "X", "Y"). However, this results in all rows with the value "Y". Am I using the wrong function or wrong expression?

Use the "Rule" action instead of the expression:

Hope this helps.