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

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

Updating records

Highlighted
Meteor

Hi,

 

I've a dataset below and I would like to update the rows that only have one decimal place e.g. "1.1" "1.2" etc. 

It is based on a RAG status and if any of the records contains a RAG status that is "below" the one in the "main" row it should be updated accordingly.

E.g. if "1.1.2" contains Amber then "1.1" should be updated to Amber.

NumberColour
1.1Green
1.1.1Green
1.1.2Amber
1.1.3Green
1.2Amber
1.2.1Red
1.2.2Green
1.3Amber
1.3.1Red

 

Below is the table with the updated values (rest remains the same) 

1.1Amber
1.2Red
1.3Red

 

Many thanks,

 

Pav

I'd use a RegEx to parse the Number to a one decimal place one and an item

You can then create a priority table converting Red/Amber/Green to 1/2/3

Use a summarise tool to get minimum value for each record.

Then convert back to a colour by joining to the colour table again.

 

2016-07-18_14-10-23.jpg

 

ACE Emeritus
ACE Emeritus

I guess this is identical in logic to that of @jdunkerley79, except it uses formulae instead of parse tools and lookup tables; thought I would post it as just another way to do the same thing.

I like @JohnJPS approach as well, one other idea is to use a sort (by NumberOut Asc, ColourInt Desc)  and then a sample (take first 1 for each NumberOut). No need for summarise then

 

2016-07-18_14-44-28.jpg

Meteor

This is amazing, thank you both. Really helped me here

Labels