I am trying to change(Substitute) a value to be shown

I am trying to change the value to be seen to my user when a certain value is given.

When โ€œ+โ€ shows up in my raw data I want โ€œPositiveโ€ to be shown in my app. I cannot seem to make this happen. Here is my current expression:

SUBSTITUTE([Antigen], โ€œ+โ€, โ€œPositiveโ€)

The error it gives:
The filter condition โ€˜=SUBSTITUTE([Antigen], โ€œ+โ€, โ€œPositiveโ€)โ€™ of format rule โ€˜Positive Color Codeโ€™ must return true or false.

Solved Solved
0 11 526
1 ACCEPTED SOLUTION

Sure, you can also use this formula.

IF([Antigen] = โ€œ+โ€, โ€œPositiveโ€, โ€œNegativeโ€)

View solution in original post

11 REPLIES 11

What property are you applying this formula?

Property? Where is that? I was doing this in โ€œFormat Rulesโ€? Is that what you are asking?

Yes, Iโ€™m referring to the property of the column but it seems that you are applying the formula into a format rule. I think you can use the SUBSTITUTE in the column properties because you are changing a data.

What you can do here in format rules is to change the formula into [Antigen] = โ€œPositiveโ€, and you will add an icon, select a color, change the property of the font such as bold, italic, strikethrough, etc.

Here is my problem. My raw data looks like this:

3X_a_f_afffcd318dc2bae8a428a68150790ffcc662b91a.png

I am trying to change those โ€œ+โ€ and โ€œ-โ€ so that we can read it better in the app.

Does that make more sense?

So i cannot put:
[Antigen] = โ€œPositiveโ€

Because it never does in my raw data.

Then just create a virtual column and apply this formula SUBSTITUTE([Antigen], โ€œ+โ€, โ€œPositiveโ€) because you are trying to change the data. You cannot change the data in format rule.

PERFECT!

Thank you so much!

Last question - can it also say โ€œNegativeโ€ if the โ€œ-โ€ comes up?

Havenโ€™t used substitute formula, but you can try this one.
OR(SUBSTITUTE([Antigen], โ€œ+โ€, โ€œPositiveโ€),SUBSTITUTE([Antigen], โ€œ-โ€, โ€œNegativeโ€))

Thanks that didnโ€™t quite work so i changed it to this -

IF([Antigen] = โ€œ+โ€,
SUBSTITUTE([Antigen], โ€œ+โ€, โ€œPositiveโ€), โ€œNegativeโ€)

And it worked!

Thanks again so much

Sure, you can also use this formula.

IF([Antigen] = โ€œ+โ€, โ€œPositiveโ€, โ€œNegativeโ€)

Thanks

Top Labels in this Space