community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.
Getting started with Designer? | Start your journey with our new Learning Path!

Challenge #183: Roman Numeral Math

Meteoroid

Spoiler

Alteryx Certified Partner
Spoiler
Tokenize, Find and Replace, Split apart, reassemble
Capture.JPG

@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
Meteor
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
Quasar

My solution:

 

Spoiler
Capture.JPG
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

Fireball

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
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
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!

Bolide

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