Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following steps to calculate the total value depending on a currency selection button:
1) A button to select between Local Currency/ Euro. The selection is kept in a variable vCurrency (Values can be LC or EUR)
2) A variable: vCurrencyField to select either the field of LC [Amount LC] or the field with EUR calculations [Amount EUR]. The formula I am using is: =if((vCurrency)='EUR','[Amount EUR]','[Amount LC]')
3) I want to use vCurrencyField in another variable vAmount : sum({<Year={$(vCurrent_Year)},Type={$(vType)}>}$(vCurrencyField))
Unfortunately this does not work. Am I missing any $ or = signs? or what could be the problem?
Best regards,
AD
2) Field names don't include the square brackets.
i think #2 is wrong too... lose the single quotes
=if((vCurrency)='EUR',[Amount EUR],[Amount LC])
OR #2 is right and you can lose the $() on the vCurrencyField in #3
sum({<Year={$(vCurrent_Year)},Type={$(vType)}>} vCurrencyField )