Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jasmeenkr
Contributor
Contributor

How to calculate field in script after joining two qvd

Hi All,

 

I am trying to create calculated column Count based on two columns coming from join of two qvds.

something like :

Result:

Load * from qvd1

join(qvd1)

Load * from qvd2

 

Result Summary:

Load* , if( booleanid='false',count,0) as CountTotal

resident Result;

drop Result;

Labels (1)
4 Replies
AdiPai
Creator II
Creator II

Hi J ,

This looks correct , the resident load is the correct way to do this .. isnt this working ? what issue are you getting ?

 

Cheers 

 

jasmeenkr
Contributor
Contributor
Author

It is taking a lot of time in loading data around 10 minutes.

marcus_sommer

You may speed up your task if you don't load all fields with a * wildcard and maybe only relevant records (means applying of any possible filters).

I assume that you only need one field from one of the tables to perform your calculation and in this case a mapping table would be more suitable, like:

m: load KEY, LookupValue from qvd_X (qvd) where exists(KEY);

t: load *, applymap('m', KEY, 'default') as New from qvd_Y;

Usually it's much faster as join approaches.

- Marcus

jasmeenkr
Contributor
Contributor
Author

Thanks for your response.  I am using only required fields in place of *.

 

Let me try out using mapping load.