Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

evelien_morel
New Contributor

Variable as expression

Hi all,

I'm trying to use a variable as an expression.

It works but only half. Can anybody shed some light please?

I have a inputbox with predefined values only, being 'EUR' and 'Local'.

Whatever is selected in the inputbox, goes to a variable vCurrency.


I use the variable in another variable vCurrAmount.

In that variable I define the following:

if(vCurrency = 'EUR', [Amount EUR Curr], [Amount Transaction Curr])

In my chart, I use the variable vCurrAmount as expression.

sum($(vCurrAmount))

This works fine if in the inputbox the option 'EUR' is selected.

If I select the option 'Local', the expression doesn't work anymore.

I've tried a lot of different thing with $ signs and = marks.

Nothing seems to give me the correct result.

Many thanks in advance.

Evelien

Tags (2)
1 Solution

Accepted Solutions

Re: Variable as expression

What you currently have works fine for me (see attached).

If you are seeing something different, you will need to post a .qvw with that behavior.

2 Replies

Re: Variable as expression

What you currently have works fine for me (see attached).

If you are seeing something different, you will need to post a .qvw with that behavior.

evelien_morel
New Contributor

Re: Variable as expression

Nicole,

I tried the whole thing again in a different QVW and there it also works fine.

No idea why it doesn't work in the original file.

Thanks that you checked it for me.

Community Browser