alteryx Community

# Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
###### IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

## Challenge #386: Shed Light on a Bank’s Risky Business

Alteryx

Hi Maveryx,

A solution to last week’s challenge can be found here.

This challenge comes to us from  @hannah_malek  . Thank you for your contribution, Hannah!

Every month, the Risk Team at XYZ Bank compiles a risk report in which each key risk indicator (KRI) is assigned a red, amber, green (RAG) status according to specific thresholds. These thresholds are unique for each KRI and may be modified periodically.

The dataset comprises a collection of KRIs, dates, relevant KRI details, as well as the corresponding thresholds for each KRI on a given date. These include threshold limits for the red category and upper and lower limits for the amber and green categories, along with their respective operators.

Your challenge this week is to calculate the RAG status for each KRI based on the RAG thresholds for that particular date.

11 - Bolide

C386

Spoiler
Green High: IIF(IsEmpty([Green High]),9999999,[Green High])
Green Low: IIF(StartsWith([Threshold Green], '>'),tonumber(REGEX_Replace([Threshold Green], '.(.*)', '\$1')),[Green Low])
Rag: IF [Value]>=[Green Low] and [Value]<=[Green High] THEN 'Green'
ELSEIF [Value]>=[Amber Low] and [Value]<=[Amber High] THEN 'Amber'
ELSE 'Red'
ENDIF
17 - Castor
Spoiler
9 - Comet
Spoiler
Solution Attached
17 - Castor

Decent challenge!

Spoiler
16 - Nebula
Spoiler
17 - Castor

My solution.

I made 2 solutions.

Spoiler

ACE Emeritus

I feel like there is an error in the data where one of the values says green if > 10000, but the value for "Green Low" is 8000.  Otherwise here's my solution:

Spoiler
17 - Castor
Spoiler

Having issues uploading image

16 - Nebula
Spoiler