Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Currency Conversion expression help

Hi

I have below expression in my text object.

=sum(IF([Month of Expense]=MONTH(Today()),

     IF([Year of Expense]=YEAR(Today()),[Expense Amount (USD)])))

In the above expression all the local amount(DIFFERENT CURRENCY TYPES)  has been converted to USD and that converted field is [Expense Amount (USD)].


now by default I want the text box to display USD amount as per the above expression.

Now I have a list box with diff currency types and also I a have another field called Expense Amount(Local) which has amount in local currency.when I select any of the currency types from the list box Currency  I want the value to be changed accordingly or I want to use the below expression.

sum(IF([Month of Expense]=MONTH(Today()),

     IF([Year of Expense]=YEAR(Today()),[Expense Amount (Local)])))

can I put ,

getselected(Currencytype) then

sum(IF([Month of Expense]=MONTH(Today()),

     IF([Year of Expense]=YEAR(Today()),[Expense Amount (Local)])))  else

sum(IF([Month of Expense]=MONTH(Today()),

     IF([Year of Expense]=YEAR(Today()),[Expense Amount (USD)])))

Not sure how to write expression for the above logic in a proper way.

Thank you very much.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Are you looking for something like

=If( GetSelectedCount( Currencytype )>0,

sum(IF([Month of Expense]=MONTH(Today()),

     IF([Year of Expense]=YEAR(Today()),[Expense Amount (Local)])))

,sum(IF([Month of Expense]=MONTH(Today()),

     IF([Year of Expense]=YEAR(Today()),[Expense Amount (USD)])))

)

View solution in original post

2 Replies
swuehl
MVP
MVP

Are you looking for something like

=If( GetSelectedCount( Currencytype )>0,

sum(IF([Month of Expense]=MONTH(Today()),

     IF([Year of Expense]=YEAR(Today()),[Expense Amount (Local)])))

,sum(IF([Month of Expense]=MONTH(Today()),

     IF([Year of Expense]=YEAR(Today()),[Expense Amount (USD)])))

)

Not applicable
Author

Great.Thank you very much.