Weekly Challenge

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

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

Challenge #183: Roman Numeral Math

Highlighted
7 - Meteor

Spoiler

Highlighted
Alteryx Certified Partner
Spoiler
Tokenize, Find and Replace, Split apart, reassemble
Capture.JPG
Highlighted
16 - Nebula
16 - Nebula

@Niklas wrote:

For those who chose not use a macro or dynamic replace, I recommend that you check that you pass this one:

 

MDCCXXXII * LXXIX / IX + I * VII = 15210.111

 

Order of operands matter. @patrick_digan fancy the challenge?


@Niklas I built a simple solution which just does 2 passes with the multi-row formula, one for multiplication and division with a second pass for addition and subtraction. It's not very pretty at this point...

Spoiler
Annotation 2019-10-01 135354.jpg
Highlighted
8 - Asteroid
Spoiler
Here's my solution. Relied heavily on multi-row formula tools, but it should pickup the operators regardless of what the equation is. That was really important to me so the workflow could be applied to any roman numeral equation you throw at it, although I had similar questions others have had about the order of operations.

Capture.PNG
Highlighted
12 - Quasar

My solution:

 

Spoiler
Capture.JPG
Highlighted
8 - Asteroid

@patrick_digan nice! I like the use of the Switch formula.

 

Figured I should deliver on my end as well after a challenge like that. My solution attached, but I think yours is slightly neater

Highlighted
11 - Bolide

This was a fun one! I didn't match the provided solution due to evaluating in PEMDAS order as others have already mentioned.

 

Spoiler
I thought there had to be some way to build a formula string and then evaluate it, but never would have thought about the Dynamic Replace tool! I did it the longer way, but got the job done (and learned a new tool afterward!)

challenge_183_workflow_part1.PNGchallenge_183_workflow_part2.PNG

challenge_183_result.PNG
Highlighted
Alteryx Partner
Spoiler
Capture d’écran 2019-10-01 à 23.27.36.png
Using dynamic replace for the first time destabilized me but the challenge worse it. Nice one
Highlighted
8 - Asteroid

Several attempts later...not quite as tidy as it probably should be...also needed some help on the dynamic replace but got there in the end!

Highlighted
12 - Quasar
12 - Quasar

Once I figured out that I needed to incorporate a solve for the numerals equaling 4 and 9 I was able to get the right answer. Fun challenge! 

Spoiler
I initially struggled to figure out how to get the function (I created) to calculate, but then thought of passing the whole string to a formula tool. 
Challenge 183.PNG
Challenge 183 - m.PNG