Given attached table as an abstract example, following task:
Sales amounts are listed in local currency, now I want to get the totals considering that. So I want to create a calculated field (to display in a KPI visual) that shows the overall total. For that I need to apply a currency transformation formula depending on the country of each row. As I have multiple countries, the correct transformation formula must be applied.
Something like
ifelse
(country =“A”,
sum(sales amount) / formula A,
country = “B”,
sum (sales amount) / formula B
I get errors around nesting aggregated and non aggregated with this approach. What can I do?