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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
danielnevitt
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
buzzy996
Master II
Master II

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

Digvijay_Singh

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

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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

shiveshsingh
Master
Master

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