3 Replies Latest reply on Aug 14, 2018 8:12 AM by Alessandro Passera

# Divide if

Hi everyone,

I have a table containing a column for every week of the year, and a row for each country.

The table displays the sum of orders in the currency of the country per week.

The problem is: all of the countries in the table use Euro exception for USA. I would like to divide the sum of USA Orders by 1.14 in order to get the corresponding value in euros.

Is there any possibility to do so?

Alessandro

• ###### 1. Re: Divide if

Hi Alessandro,

If country="US"

then

Currency/1.15

else

currency

end

this will do,

hope this helps kindly mark this answer as correct or helpful so that it will help others

BR,

NB

1 of 1 people found this helpful
• ###### 2. Re: Divide if

HI Alessandro,

You can try below logic:

if ([Country])='USA' then [Sales] / (1.14) else [Sales] END

1 of 1 people found this helpful
• ###### 3. Re: Divide if

Hi,

I created a Calculated Field with the logic displayed above adapted for the SUM of all the currency.

The problem now is that, when I plot the result in an horizontal bar, it doesn't actually divide the currency by 1.14. At the same time, if I point the mouse on the bar, it actually shows the name of the Calculated Field with the correct divided amout.

My question is:

How can I ensure that the value represented by the bar is also divided by 1.14?

The Calculated Field that I created is:

SUM(IF [country] = 'USA' THEN [Currency] END)/1.14