Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vinicius_siquei
Partner - Contributor III
Partner - Contributor III

Best Practice for Currency

Guys,

I'm modelling data for a new project that will handle different currencies.

What is the best practice for that ?

  • Load data many times, concatenating rows and creating a column "currency" to be used as a filter.

  • Load data in original format and use IF on the expression, according to the currency selected.

Thanks

Vinicius

4 Replies
Gysbert_Wassenaar

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)


talk is cheap, supply exceeds demand
oscar_ortiz
Partner - Specialist
Partner - Specialist

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

Not applicable

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

reinholdgraf
Creator
Creator

This is Best Practice !

Is this valid for QliksenseServer as well ?