Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
User0
Contributor III
Contributor III

Convert currency with filter button

Hi there,
I  have a data set which has all the amount data in USD. I want to have a filter where the user can select if he wants to see the amount in Local currency(Canada Dollar) or USD. The conversion should be done based on the brand country.
For example :

Brand Name Brand Country Amount Type
A USA 3000 Soap
B USA 2300 Tissue
C Canada 3400 Soap
D Canada 2499 Lotion

 

I want the amount to be displayed as per the brand country. Can you please suggest the correct way to do it, I need to do it using filter only.

Thank you

4 Replies
MayilVahanan

Hi

You can bring one more column value with local currency. 

And one filter has local / USD currency.

Load * inline

[

Currency

Local

USD

];

Changed the expression based on the filter selection.

Sum(If(Currency = 'Local', AmountLocal, Amount))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
User0
Contributor III
Contributor III
Author

Hi @MayilVahanan ,
My currency rate are stored in an excel sheet in the below format :

Year YSD to CD
2020 x
2021 y
2022 z

 

And I am unable to create Amount local as a separate column , can you please help?

Mark_Little
Luminary
Luminary

HI @User0 

How i tackle this is i bring in the exchange rate at the line level then in the set analysis you can apply the correct currency depending on which the user selected.

SUM(Sales/$(vCurrency))

vCurreny being a variable that picks up the correct column base of an IF statement

 

User0
Contributor III
Contributor III
Author

I am unable to add the coulmn