Choose Language Hide Translation Bar
Highlighted
adam
Level IV

Conditional Formatting If and print result

I am setting up few criterias for a Pass/Fail result with IF AND statement as shown below:

 

If( :Criteria 1 == 0 & (:Criteria 2 == 0 & (:Criteria 3 == 0 & :Criteria 4 == 0)),
0,
1
)

 

For the result, it return as either 0 or 1. I would like to know is it possible to change it to Pass or Fail instead of just 0 or 1.

 

Thanks. 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
ian_jmp
Staff

Re: Conditional Formatting If and print result

Looks like you are using a formula to define a new (Numeric) column. In which case you can use an appropriate value label to recast the appearance of the values. Else you could use a Character column and have values as "Pass" and "Fail" strings.

View solution in original post

Highlighted
uday_guntupalli
Level VIII

Re: Conditional Formatting If and print result

dt << New Column("Result",Character,Continuous,Formula(If( :Criteria 1 == 0 & (:Criteria 2 == 0 & (:Criteria 3 == 0 & :Criteria 4 == 0)),
	"Fail",
	"Pass"
  )))

Try this . I think Ian is referring to this .. 

Best
Uday

View solution in original post

3 REPLIES 3
Highlighted
ian_jmp
Staff

Re: Conditional Formatting If and print result

Looks like you are using a formula to define a new (Numeric) column. In which case you can use an appropriate value label to recast the appearance of the values. Else you could use a Character column and have values as "Pass" and "Fail" strings.

View solution in original post

Highlighted
uday_guntupalli
Level VIII

Re: Conditional Formatting If and print result

dt << New Column("Result",Character,Continuous,Formula(If( :Criteria 1 == 0 & (:Criteria 2 == 0 & (:Criteria 3 == 0 & :Criteria 4 == 0)),
	"Fail",
	"Pass"
  )))

Try this . I think Ian is referring to this .. 

Best
Uday

View solution in original post

Highlighted
adam
Level IV

Re: Conditional Formatting If and print result

Thank you very much Ian and Uday. It works as expected :)

Article Labels

    There are no labels assigned to this post.