Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Guys,
I'm modelling data for a new project that will handle different currencies.
What is the best practice for that ?
Thanks
Vinicius
Load a separate table with the currencies and conversion rates. If you select one currency then only one conversion rate will be possible. You can use this in expressions: sum(Amount)*only(ConversionRate)
You may simply want to add a currency conversion table containing a currency type and conversion factor.
In your charts you can simply create expressions based upon the currency type:
Sum( {< [Currency Type] = {'US'} >} [Conversion Factor] ) * Sum( [Your Value] )
Hope this helps,
Oscar
Hello Vinicius,
I have done this last week, i can understand your challenge.
What we have done is to gather information from an XML provided by the Federal state and create a QVD. this QVD has an automatic reload every month, therefore we are always up to date.
This is the script we use to create the QVD.
devise:
LOAD code,
land_de,
land_fr,
land_it,
waehrung,
kurs,
year,
month
FROM
[\\OTG-QVIEW\Report\Data\devises.qvd]
(qvd);
// recharge de données du taux de change
LOAD code,
land_de,
land_fr,
land_it,
waehrung,
kurs,
$(année) as year,
$(mois) as month
FROM [http://www.afd.admin.ch/publicdb/newdb/mwst_kurse/estv/mittelkurse_xml.php?m=$(mois)&j=$(année)] (XmlSimple, Table is [monatsmittelkurs/devise]);
store devise into \\OTG-QVIEW\Report\Data\devises.qvd (qvd);
As you can see, we get the data and we use STORE to create a QVD file that we can use for any other QVW.
Then, in our main QVW that needed those currency information, we do have this script.
Devises:
LOAD code,
land_de,
land_fr,
land_it,
waehrung,
kurs,
year,
month,
Hash128 (code,year,month) as %Clé_Devise
FROM
[\\OTG-QVIEW\Report\Data\devises.qvd]
(qvd);
Hope this help. need more info please ask
JP
This is Best Practice !
Is this valid for QliksenseServer as well ?