Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
New 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 (2)
4 Replies
Highlighted
Contributor

Re: How to calculate field in script after joining two qvd

Hi J ,

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

 

Cheers 

 

Highlighted
New Contributor

Re: How to calculate field in script after joining two qvd

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

Highlighted
MVP & Luminary
MVP & Luminary

Re: How to calculate field in script after joining two qvd

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

Highlighted
New Contributor

Re: How to calculate field in script after joining two qvd

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

 

Let me try out using mapping load.