Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Multiplying or dividing a column of data to create a new column from the calculation

beadyeyesbb
7 - Meteor

Hi

 

I have a column in my data which is local currency revenue for Denmark, Norway and Sweden. I'd like to apply an exhange rate to to Norway and Sweden to make the revenue in line with Denmark and create a new column called Revenue DKK 

 

How would I go about doing it? I also have a column called country which determines which country it falls into.

 

Thanks for any help 🙂 

 

 

4 REPLIES 4
grossal
15 - Aurora
15 - Aurora

Hi @beadyeyesbb,

 

are you able to provide some sample data and a desired output? This let's us build a workflow for you 😃

 

Anyway: This sounds like a Formula Tool scenario to me.

grossal_0-1588321954652.png

 

Replace 1.14 with your actual Exchange Rate. If the country list will grow in the feature, I'd go with an extra table, a Join Tool and a Formula.

 

grossal_1-1588322060227.png

 

 

A workflow could look like this:

 

grossal_2-1588322107618.png

 

Let me know what you think.

 

Best

Alex

beadyeyesbb
7 - Meteor

Thank you for response to this.


Looks like it might be what I am looking for. 


I tried he formula though and when it completes it goes grey. Is that correct? 

 

beadyeyesbb_0-1588322806853.png

 

Is there a way to specify two multiplers in the formula? so for example if the exchnage rate is different for norway and sweden? 

 

thank you 🙂 

grossal
15 - Aurora
15 - Aurora

Yes, you can add another IF-Condition - this would look like this:

 

grossal_0-1588323110296.png

 

I also added a third condition. This allow allows you to return -1 if the Country is something that isn't Denmark, Sweden or Norway.

 

 

If you plan to extend the Country-list in the future I'd recommend going the option with the Join-Tool.

grossal_1-1588323255345.png

 

I'll attach the example workflow for you to check it out yourself. The extra-list offers more flexibility and less complexity - even with just 3 countries. Let me know what you think. If this solved your problem, please accept it as as solution - this helps others to find it more quickly.

 

 

Best

Alex

beadyeyesbb
7 - Meteor

This is great, many thanks for your help 🙂 

Labels