Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Fill in a specific cell if meets criteria, based on data from another cell

Luqman
7 - Meteor

Hi All

SequenceUnits
230
240
160
270
180
140
170
123739.516
440130.15
111265.737
101562.042
349790.54
1-33425.7
7-870.226

 

How do i write a formula in such a way that 
If Sequence in ('17, '18', '27')

and (other criterias)

then 

Units = Units(from sequence '3' specifically) * 80%

3 REPLIES 3
cjaneczko
13 - Pulsar

What is your Other Criteria? If Sequence isn't a String, don't use the quotes. If it is a string, the quotes are needed. So far what you have written down seems ok. You will need an ENDIF at the end of the statement, otherwise it looks fine as you have it typed up.

 

If you only want to multiply by the Unit value where Sequence = 3 then you should filter on Sequence = 3 and append that value to your main set of data. Then use the IF statement to multiply by the appended field.

Qiu
21 - Polaris
21 - Polaris

@Luqman 
I share the same question with @cjaneczko 
Can your further clarify and maybe share a desired output?

CoG
14 - Magnetar

If multiple [Sequence] associations exist, you could also create a dependency table, that is then joined to your main table (or Find and Replaced) (to get the Units value) and then joined back to the main table again for the purpose of calculations (this would also remove the sequence check from the formula, but would necessitate you be careful to avoid cyclical references, which may cause abnormal outputs)

SequenceDependency

17

3
183
273
......

 

Your formula would then look something like

 

IF (other criteria) THEN [Units] = [Dependency_Units] * 80% ELSE [Units] ENDIF

 

More info, would be very helpful to tailor assistance, but I figured I may as well jump in and take a shot in the dark.

Labels
Top Solution Authors