Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show Expression with Condition

Dears,

Good day.

I have a simple pivot table with 5 dimension and 2 expression as columns, one column with total sum in dollars and the other one total sum in euros. What I want it to do is show only the column (either USD or EUR) if I select USD / EUR from an isolated table named "SetCurrency" which has those two values.

Any ideas??, many thanks.

Mauriccio

6 Replies
villafuerte
Partner Ambassador
Partner Ambassador

Hi,

I've attached a file that includes an example. I hope it helps!

Cheers



villafuerte
Partner Ambassador
Partner Ambassador

The first one assumes that you have different columns for each value, here's another one that works with the exchange rate.

Cheers

Not applicable
Author

It works perfectly!! Many thanks!!!

Many thanks

Mauriccio

Not applicable
Author

write expression with condition like this...

=if(SetCurrency='USD','USD field name','Eur field name')

thanks

A'run'

Not applicable
Author

Dear A'run,

Many thanks!!!.

Mauriccio

johnw
Champion III
Champion III

Here's a currency conversion example. In addition to the column switching from USD to EUR, it also uses the right currency symbol, correctly uses commas and periods in the number, and formats the date correctly for good measure. For performance and chart simplicity, the script applies the exchange rate at the time to each sale and stores the converted amounts in a separate table keyed by the sale ID and the currency.

There might be more here than you need, and I haven't actually done any live applications with regionalization or currency conversion, so I don't guarantee this is the simplest and best way, or that it will scale up to large applications. But it seems fairly robust to me on the surface.