Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Re: Currency - store in QVD

hi evelien,

as you said, code is the same.

the only difference is in the system variables but i find it hard to beliave this is the reason...

your settings are:

SET ThousandSep='.';

SET DecimalSep=',';

SET MoneyThousandSep='.';

SET MoneyDecimalSep=',';

SET MoneyFormat='€ #.##0,00;€ -#.##0,00';

SET TimeFormat='h:mm:ss';

SET DateFormat='D/MM/YYYY';

SET TimestampFormat='D/MM/YYYY h:mm:ss[.fff]';

SET MonthNames='jan;feb;mrt;apr;mei;jun;jul;aug;sep;okt;nov;dec';

SET DayNames='ma;di;wo;do;vr;za;zo';

while my settings are:

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='$#,##0.00;($#,##0.00)';

SET TimeFormat='h:mm:ss TT';

SET DateFormat='M/D/YYYY';

SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

maybe somthing in here.... i really dont know.

maybe jonathan has an idea.....

anyhow, when i run my code i dont see any problem with text/ numeric issues...

my numbers are good.

Highlighted
Contributor
Contributor

Re: Currency - store in QVD

Elanir,

I found a solution for my problem.

I put the function EVALUATE around the ToEUr and FromEur fields.

Now, all my values are numeric.

Thanks for your help

Highlighted
Not applicable

Re: Currency - store in QVD

Hi Evelien,

I have tried using the Currency_Model file to work with multiple exchange rates.  Did you get it to work?

/Thor

Highlighted
Contributor
Contributor

Re: Currency - store in QVD

Hi Thor,

If you run the QVW for the first time, the QVD stores all the currencies for all the days you've asked.

If I run the QVW a week later, the only thing he stores in the QVD are the USD currencies. All the other currencies are deleted somehow.

So no, actually it doesn't work but I haven't found a solution to get it to work.

If you should find a solution, please let me know.

Highlighted
Not applicable

Re: Currency - store in QVD

hi Evelien and Thor,

im attaching two samples of QVW files i experimented with on the currency.

take a look and see if it helps you.

Elad.

Highlighted
Not applicable

Re: Currency - store in QVD

Thanks Elad

I am getting a script error when trying to load:

2012-11-22_08-53-27.jpg


Regards

Thor

Highlighted
Not applicable

Re: Currency - store in QVD

in the code,

you'll see the URL of www.oanda.com.

at the end of that line, you'll see a '@3'.

change it to '@6' and it should work. just tried it now.

but im not sure about what Evelien said about it erasing old data...  i didnt have a chance to take this solution to production...

Highlighted
Contributor
Contributor

Re: Currency - store in QVD

Hi,

here you have my 2 files.

As you can see. In my Currencies QVW you only see the US Dollar going back quite some time.

The other currencies are only those of today.

if you delete the QVD, there will be a new QVD made.

The first time you use the new QVD, all the currencies will be there.

Once you have re-run the QVW the next day, most of the currencies dissappear.

FYI

Highlighted
Not applicable

Re: Currency - store in QVD

try adding something that will alow incremental load.

somthing like this:

IF isnull(QvdCreateTime('..\QVD\Currencies.qvd')) THEN //************* New Load ****************

Currencies:

LOAD

FROM <put your load script here with first date you want to run from>;

STORE NewRules into ..\QVD\NewRules.qvd(qvd);

drop table Currencies;

ELSE //************* Loads only new data ****************

IncrementalLoad:

LOAD *

FROM

..\QVD\Currencies.qvd(qvd);

MaxDate:

LOAD Timestamp(Max(LAST_MODIFIED_DATE),'YYYY-MM-DD hh:mm:ss') as MaxDateTime

Resident IncrementalLoad;

Let vMaxDateTime = Peek('MaxDateTime',-1,MaxDate);

DROP Table MaxDate;

Concatenate

LOAD

FROM <put your load script here with first date you want to run from>;

// but this time use '$(vMaxDateTime)' as the earliest date you want to extract from;

STORE IncrementalLoad into ..\QVD\Currencies.qvd(qvd);

ENDIF

i believe this should do the work.....

let me kno whow it went.

Highlighted
Contributor
Contributor

Re: Currency - store in QVD

Hi Elanir,

I should saw that I put the wrong QVW in annex.

Here you see the QVW that make the QVD file.

I think i'm already doing what you suggest in the previous post.