Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

IF CONTAINS THEN ADD

KamenRider
11 - Bolide

Hi everyone,

 

I have here problem that gives me a null value. I hope someone could solve this.

 

The data type is string. Sample

 

Price

99-30+

99-04

 

Solution should be

99-30.5

99-04

 

my formula is IF CONTAINS([Price],"+") THEN ([Price]+0.5) ELSE [Price] ENDIF.

 

Can someone to please provide me the correct formula or solution.

 

Then after that we are going the extract the numbers after the dash. Sample

 

99-30.5 

99.04

 

Solution

30.5

04

 

Thanks,

Kamen

 

3 REPLIES 3
Qiu
21 - Polaris
21 - Polaris

@KamenRider 
Can we just use a Replace function for "+"?
As for the 2nd question, I dont get how 99-04 becomes 99.04.

1201-KamenRider.png

KamenRider
11 - Bolide

Hi @Qiu 

 

I believe this is ok. Can you also help me extract the number after the dash?

example 

99-30.5 = should be 30.5

99-04 = should be 04

 

Thanks,

Kamen

Qiu
21 - Polaris
21 - Polaris

@KamenRider 
Something like this?

1201-KamenRider-r1.png

 

Labels