Dynamic Values based on Currency Filter

Hi all, can someone give me a tipp how I can implement this dynamic function so that my revenue change according to the currency chosen?
I have two separate columns: total_cost and total_cost_usd

  • I have created a parameter LC (which stands for LocalCurrency) and one USD.
  • I have created a calculated field → ifelse(${LC}=‘Total Cost’,{Total cost},${USD}=‘total_cost_usd’,{total_cost_usd},{Total cost})

but now I dont know how to continue.

Bonus question: how would that work for cost-based-KPIs such as ‘CPC’? Would that also be automatically applied or would I need to change the KPIs formulas?

image

HI @Patrizia_Buompastor1

you have two parameter or one with two values (LC and USD)? If two parameter, one is enought. :wink:

Create a currency parameter (pCurrency) with LC and USD as value
Create a calculated field (total_cost_cur) = ifelse(${pCurrency}=‘LC’,{Total cost},${pCurrency}=‘USD’,{total_cost_usd},{Total cost})
You can use the total_cost_cur in your visual or every other caluclation.

BR