Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need a global variable that I can use as a "Reference Lines".
Can I create a variable in the loading script phase?
I need a the calculation of the [TIMESTAMPEND]/ [RECORDCOUNT] for each record
LOAD
[VERSIONE] as versione_f,
[RETEACCESSO] as reteAccesso_f,
[ADNETWORK] as adNetwork_f,
[CLI_INDIVIDUATO] as CLI_Individuato_f,
[MSISDN_INDIVIDUATO] as MSISDN_Individuato_f,
[CLUSTER_INDIVIDUATO] as Cluster_Individuato_f,
[TIMESTAMPSTART],
[TIMESTAMPEND],
date(Mid(TIMESTAMPSTART,1, 10)) as Data_inizio_f,
date(mid(TIMESTAMPEND,1, 10)) as Data_fine_f,
mid(TIMESTAMPSTART,12, 2) as Ora_inizio_f,
mid(TIMESTAMPSTART,12, 12) as Orario_inizio_invio_f,
mid(TIMESTAMPEND,12, 2) as hour,
mid(TIMESTAMPEND,12, 12) as Orario_fine_invio_f,
[RECORDCOUNT] as TotalRequest
FROM [$(Loadworkpath)AdvHub_frequente.qvd]
(qvd);
Calculate the values in the load script and add them in a new field:
LOAD
[VERSIONE] as versione_f,
[RETEACCESSO] as reteAccesso_f,
[ADNETWORK] as adNetwork_f,
[CLI_INDIVIDUATO] as CLI_Individuato_f,
[MSISDN_INDIVIDUATO] as MSISDN_Individuato_f,
[CLUSTER_INDIVIDUATO] as Cluster_Individuato_f,
[TIMESTAMPSTART],
[TIMESTAMPEND],
date(Mid(TIMESTAMPSTART,1, 10)) as Data_inizio_f,
date(mid(TIMESTAMPEND,1, 10)) as Data_fine_f,
mid(TIMESTAMPSTART,12, 2) as Ora_inizio_f,
mid(TIMESTAMPSTART,12, 12) as Orario_inizio_invio_f,
mid(TIMESTAMPEND,12, 2) as hour,
mid(TIMESTAMPEND,12, 12) as Orario_fine_invio_f,
[RECORDCOUNT] as TotalRequest,
[TIMESTAMPEND] / [RECORDCOUNT] as NewField
FROM [$(Loadworkpath)AdvHub_frequente.qvd]
(qvd);
It can be done as shown by Gysbert, but note that this is going to break your optimized load. May be you don't have to worry about it, but if you have lot of data getting loaded from the qvd you might want to perform this division on the front end of the application or by taking a subset of data from this table in a resident table and save it as a separate table linked to the main table on some kind of key. I don't know you data well enough to guide you in detail, but just wanted to bring the issue of breaking optimized load.
http://www.quickintelligence.co.uk/qlikview-optimised-qvd-loads/
http://www.learnqlickview.com/qlikview-mapping-load-optimized-or-un-optimized/