Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Loading Data and Group by

Hello,

I was given a task to check a script

but the thing is i have 2 questions

1- The first quwstion is do I need to Load a pre loaded  data if I will use it in the left join field ??? look at the part of the script

Left JOIN(CompanyPerformance)
LOAD

      
SalesNumber,

      
if(MaxAXESalesNumber - SalesNumber = '0', '1', '0') as FlagMaxAXESalesNumber


Resident
CompanyPerformance;

We loaded the Sales number in a previous left join ... Do we really need to load it here again ?

--------------------------------------------------------------------------------------------------------

2- The second question is do I need to load data if I will Group by the loaded data by it?? look at the second script

Left JOIN(CompanyPerformance)


LOAD

      
Origin,

      
max(SalesNumber) as MaxAXESalesNumber


Resident CompanyPerformance GROUP BY  Origin;

Thanks



3 Replies

Re: Loading Data and Group by

Hi,

1. Yes you need to load the Sales number to join based on this field.

Because QV considers Company Performance as one table and the table derived from the company performance as another. By this it joins the data based on the common fields(field name in common).

2.Can you explain you question as briefly?

Not applicable

Re: Loading Data and Group by

Hi Adhimulam,

Thanks for the reply,

Regarding the first question: SalesNumber was loaded every time we used it, is that right?

I mean I can find it in at least 6 Left Join in the script.

2nd Question:

in the script we load Origin and at the end we group by Origin, do I need to Load Origin every time I will Group By Origin ?

Thanks

MVP & Luminary
MVP & Luminary

Re: Loading Data and Group by

Hi,

You must load the Dimension field which is going to be used in Join.  For example in the below script

Left JOIN(CompanyPerformance)

LOAD

      
Origin,

      
max(SalesNumber) as MaxAXESalesNumber


Resident CompanyPerformance GROUP BY  Origin;

You have load Origin then only the Origin in the load table is joined with CompanyPerformance.Origin value.

Hope this helps you.

Regards,

Jagan.