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.
We are aware of an issue with the Search bar. Please use Advanced search for the time being while we troubleshoot. Thanks for your patience as we work on improving the community!
alteryx Community

# Weekly Challenge

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

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

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

Submit Feedback

## Challenge #183: Roman Numeral Math

Alteryx

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

This week's challenge was shared by @LordNeilLord  and @JReid  from an original post by @AnandKumar1. Thanks to all of you for sharing this challenge!

This challenge includes two inputs: 1) An equation written in Roman numerals and 2) a look-up table of certain Roman numerals. Solve the equation and return the answer as an integer.

Update: Start file updated on 10/1/2019

8 - Asteroid

Feels good when your question comes in weekly challenge. Lets see how many different solutions will come 🙂

15 - Aurora

I've been waiting for this one to come up 🙂

8 - Asteroid

I get a different result - could be me - but you might want to check it.

Spoiler
8 - Asteroid

I got a different answer, but I was a little confused about how the order of operations should have been handled given how the formula was given.
[1]*[3]/([5]+[7]-[9]) vs ([1]*[3]/[5])+[7]-[9] (both were far off from the provided answer, which was close to just [1]*[3] less ~300 or so

Spoiler

Looks like The provided solution took ((1732*79)/9 )+(1-7)/9 and took the /9 off the first set of brackets  after converting -6/9 --> -54.
136828-54=136744. off by ~1

11 - Bolide

I don't know how the "solution" was generated but it sure didn't follow PEMDAS rules.  Anywho, another lunch break given over to another weekly challenge.  I think I need to clean up and publish my macro within my organization.

Spoiler

Edit:  Once I had the formula with the correct Hindu-Arabic numerals I thought I needed a macro.   But then I learned from @Martyn that the Dynamic Replace tool will do what I needed.  And this is why one should always review other's solutions.

8 - Asteroid
Spoiler

Struggled a bit with evaluating the expression only to realise the wonder called Dynamic Replace. My answer matches to what almighty Google thinks so I'd like to believe I am on the right track even though the solution result seems to be way off from my answer.

15 - Aurora

Finally, I understand why I've learned latin ... but I've got a different result.

Spoiler

I splitted the roman numeral to single characters, translated the characters, applied roman numeral logic (small number before a larger number => subtract, else add) and created a formula string.

I handed the formula string to a macro

Calculation result is different

8 - Asteroid

After seeing you can interpret strings as formulas in @Martyn 's solution I went in and modified the end of my workflow to incorporate what I learned from him.

Spoiler
15 - Aurora
Spoiler
Mine isn't dynamic enough to pick up if the order of operations is in the incorrect order, but does the job here.
Also getting 15,197