Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

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 #183: Roman Numeral Math

laeorn
6 - Meteoroid
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.

 

 

Jonathan_Kane
5 - Atom

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

RoDO
8 - Asteroid

My solution

 

Spoiler
challenge_183_RODO_Solution.png
JWS
Alteryx Alumni (Retired)

Great - Challenge.

ponraj
13 - Pulsar

Here is my solution

 

Spoiler
workflow.PNG
kmcdaniel
8 - Asteroid

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

 

 

tompolokonis
5 - Atom

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 🙂
Jean-Balteryx
16 - Nebula
16 - Nebula

Here is my solution !

estherb47
15 - Aurora
15 - Aurora

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

nini
8 - Asteroid

My solution: