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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
devarasu07
Master II
Master II

Group by at load script?

Hi Expert,

How to apply group by based on ID Column (Article), i used below script and getting repeated Article ID at output window.please advise me on the joining these below tables.

TotalNetPrice:

load SUM(TotalNetPrice) as TotalSales Resident Sales;

let vtotal=Peek('TotalSales');

TRACE vtotal=$(vtotal);

Cumulative%:

Load

RangeSum(peek(rum_sum),(TotalNetPrice/'$(vtotal)')) as run_sum

Resident Sales order by TotalNetPrice desc;

let vCum%=Peek('run_sum');

TRACE vCum%=$(vCum);

Grade:

load *,

if(   ('$(vCum%)')<0.6,'A Stocks',   if (   ('$(vCum%)')>0.6 and ('$(vtotal)')<0.9,'B Stocks','C Stocks')   ) as Grade Resident Sales;

DROP Table Sales;

ID repeated.JPG

1 Solution

Accepted Solutions
devarasu07
Master II
Master II
Author

All credit goes to Sunny T

Attached document working fine and my issue resolved. Regards, Deva

View solution in original post

4 Replies
Anonymous
Not applicable

See if this is:

devarasu07
Master II
Master II
Author

Hi Marcio,

Thanks for your prompt reply, I just test your attached document and still it gives the repeated value and Cumulative sum showing wrong now. any suggestion/advise please.

Expected result based on Qlikview load script method,

Output1: detailed levelexpected result1.jpg

Output2: Summary level (by grade)

expected output.JPG

!

Anonymous
Not applicable

I moved the object to a table Dynamic Graph.

See an improvement:

devarasu07
Master II
Master II
Author

All credit goes to Sunny T

Attached document working fine and my issue resolved. Regards, Deva