community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Choose cell based on more than one criteria

Atom

Hi All,

 

I have another question please!

See below a screenshot of my desired output in the final column.

 

The calculation I need to complete is:

If for a certain asset number (column A) the Number of span types (column B) = 1, then the output is simply E. I can do this step on my own without help.

 

However if the Number of span types (column B) is 2, then x number of "span type 1 count" need to result in Span type 1 length (i.e. Span ID (column H) numbers 5 down to 2 need to have the value in column E) and then the x number of "span type 2 count" needs to be Span Type 2 length (i.e. the 5th row for that asset type with a Span ID of 1).

 

There are up to 7 span types in my data that I need to do this for. If this makes sense to anyone, can someone please advise how I can do this?

 

I have attached the below sample dataset if this helps.

 

Thank you!

 

clipboard_image_1.png

 

 

Asteroid

Attached workflow . You may want to test with full data . 

Highlighted
Aurora

Hi @bwat2435 

 

An innovative solution from @benakesh with his use of the Tile tool, but for the data in your sample, a simple formula will do the trick

 

If [Number of Spans]-[Span type 1 count] >= [SpanID] then
	[Span type 2 length]
else
	[Span type 1 length]
endif

 

Results.png

Dan

 

Atom

Thank you SO much!

Labels