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

Atom
Spoiler
 



It reads every number and assigns it a value, 1 that are before V or X will be -1.

 

Operators are assigned a value 0. a running number column is created to group them, with an operator increasing the number by 1. The first number will have the group 0

 

sum the numbers up and concat their operators by their group numbers, join them together, have a running multirow formula to perform the operators accordingly

 

Had to get some inspiration from the solutions on how to manage the negative 1. 

 

Nonetheless, got to the solution!

 

Created it to take on any form of roman numerals expressions, just need to modify number of columns in the regEx tool should the number of characters exceeds 1000.

 

 

That was an interesting challenge! Here's my solution. Portions could definitely be a lot more elegant.

Alteryx Partner

My solution

 

Spoiler
challenge_183_RODO_Solution.png
Alteryx
Alteryx

Great - Challenge.

Quasar

Here is my solution

 

Spoiler
workflow.PNG
Alteryx Partner

My solution seems overly complicated. 
On the bright side, I learned how to successfully use the R tool today.

I used R's eval function to evaluate the formula string.
I'm looking forward to seeing how this challenge SHOULD be done!

 

 

Spoiler
screenshot_183.png

 

 

Alteryx Partner

Here's my solution.  The hardest part was evaluating the formula from the data.  

Spoiler
I used a table of substitution to make the Roman numerals easier to evaluate.  For example, IX can be replaced with VIIII, and then you can replace all the numerals with their arabic equivalents and add them.  No looping or fancy logic required.  It was crazy hard to figure out how to set the dynamic replace tool to evaluate the resulting mathematical statement, but it finally worked.  An "EvaluateString()" function would have helped a lot
Alteryx Partner

Here is my solution !

Pulsar

I'd love to figure out a more streamlined approach. Here's my go at it, not very different from anyone else.

 

Sometimes I do actually miss the INDIRECT function.....

Asteroid

My solution: