cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Hester
Level I

If a column contains "%"--> how can I use this type for a formula? i.e. if states "%" do formula, otherwise use a number from another column?

I'm struggling. I have a column which contains either %, /nl or 10^9 as a outcome. the linked numbers in another column have to be converted depending on these expressions. How should I use the column properties and which comparison or expression in the formula should I use? Most use a numerical part for this, but I need now the characters.

 

if --> % than calculate number *100, if not do xxx

1 REPLY 1
Craige_Hales
Super User

Re: If a column contains "%"--> how can I use this type for a formula? i.e. if states "%" do formula, otherwise use a number from another column?

A picture would help. Is the column a character column, showing the % or / or ^ ? Or is it a numeric column with just a number?

If it is a character column, the contains() function might do what you need.

 

contains("37%", "%")
3 // position of the %

contains("37%", "/")
0 // / not found (position 0 not a valid position)
Craige