Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Load script help

Dear all,

I have a load script that contains the following:

LOAD udf_exchange_cd,
[Aggregate 1 (Positive Correlation)],
[Aggregate 2 (Negative Correlation)],
[Diminishing Balance],
[Spot Month Limit New],
[Trading Ratio New],
exchange_cd,
office_cd,
desk_cd,
formatdate,
Sum(unpriced_lots) as SumUnpricedLots,
Sum(unpriced_delta_lots*[Trading Ratio New]) as TotalAgg1,
Sum(unpriced_delta_lots*-[Trading Ratio New]) as TotalAgg2,
final_pricing_dt

The script works, however I would like to calculate the TotalAgg1 value where the pcr_num is DISTINCT.  Is this possible?

Thanks,

Daniel

4 Replies
Highlighted
Master II
Master II

Re: Load script help

pls share ur input values and expected output values with some sample data.

Highlighted
Master III
Master III

Re: Load script help

Maybe you do another resident load with some key fields and count(pcr_num) as another calculated field and then create another table through resident load of former table with where condtion as 'Where counted_pcr_num =1".

Inner join this 2nd table to the main table and this will keep only records where pcr_num is distinct

Highlighted

Re: Load script help

I think you better post the entire LOAD statement. There is no field pcr_num in your sample.

Highlighted
Master
Master

Re: Load script help

Where is pcr_num in your script? HOw this is related with TotalAgg1 ?