You have to calcule the value with this idea where there are more than one column for value.
if [select currency]="USD" then value for USD
ELSEIF [currency]="BRL"then value for BRL
When you have one column for value you use the boolean filter set to true:
[currency] = [select currency]
Doing this both will follow parameter selection.
As a fellow programmer, I understand the confusion here.
In Tableau, instead of assigning a variable to [currency], like you would in most programming languages, you simply return the value.
Thus, you original version:
if [select currency]="USD" then [currency]="USD" ELSE [currency]="BRL" END
if [select currency]="USD" then "USD" ELSE "BRL" END
Derrick, i don't think this is the correct understanding.
Look what he wrote: In Graph 1, I have created a "Select Currency" parameter, since in the excel table there is a different column for each currency.
Nadir Steinmetz, can you post at least the header of these excel files?
Ah, definitely possible. I just fixed the calculation error in the latter half of the message.
Dear Derrick and Luciano,
Thank you for your kind inputs. However unfortunately this did not solve my problem, I will explain my issue again because perhaps I was not clear.
In Graph 1, the data source is formatted in a way that each currency is a different column, and therefore to switch between currencies I created a parameter and a calculated camp, which works perfectly:
In Graph 2, the data source is formatted so that Currency is a single column, therefore applying a simple filter is sufficient to switch between currencies ("Moeda" is portuguese for Currency)
Individually, both graphs work fine. However, since I am now working both graphs together in a one dashboard, is it possible to have a single way of switching currency in both graphs?
Once again thanks a lot!
1 of 1 people found this helpful
Nadir, on the second graph you won't use this field as a filter.
As i wrote before, you need to create a calculation like this: [currency] = [select currency].
Drag on the filter card and set to true.
This will make sec graph follow parameter
Once you use parameters you forget filters by fields.