Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello all,
In Data visulaization.qvw , how $(vCurrency) calculated.
the data Visulalization is available under example folder
hope someone can help
OK, here is where you can get confused:
$(vCurrency) still only returns the currency as a string, however there are fields in the Sales table for each currency. In the Data Visualization Sample they use the result of the currency variable to dynamically look at a different currency columns in the Sales Table. Those columns include (numeric) exchange rates for the sales transaction.
Eg. if you select currency "EUR" and look at the "Various Units" tab and "Bar Chart" (CH05) the expression: Sum (Sales / $(vCurrency)) calculates the Sales divided by the exchange rate stored in column "EUR".
I hope this helps,
Ingo.
Hi,
The vCurrency variable is defined as: MinString(CURRENCY) and the field CURRENCY is used in the interface flagged as "Always one selected value", this way MinString returns exactly the selected value.
Regards,
Cesar
Thanks Cesar.
but
Currency field have text value.
and the value showing for $(vCurrency) is in number why??/
Hi Sunil,
where do you see a number for $(vCurrency)? It will only return the string of the selected currency.
Ingo.
in various units tab
open any bar chart and see the sales expression
or
take one text box and type =$(vCurrency).
hope yo understand
OK, here is where you can get confused:
$(vCurrency) still only returns the currency as a string, however there are fields in the Sales table for each currency. In the Data Visualization Sample they use the result of the currency variable to dynamically look at a different currency columns in the Sales Table. Those columns include (numeric) exchange rates for the sales transaction.
Eg. if you select currency "EUR" and look at the "Various Units" tab and "Bar Chart" (CH05) the expression: Sum (Sales / $(vCurrency)) calculates the Sales divided by the exchange rate stored in column "EUR".
I hope this helps,
Ingo.