Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

help from aggr script in load statement

hi

i have 1 table with order(numordine) and order items (ccoar)


NUMORDINECCOARDTCREDTCTB
ORD1ART12014060620140607
ORD1ART22014060620140608
ORD2ART12014070520140706
ORD2ART32014060920140611


i need calculate from load script the avg difference from (dtcre and dtctb group by for ccoar) group by for any numordine !


how can I make a group by in another group by in only load statement?

in load script i can't use with aggr function..

Aggr(DISTINCT

    AVG(

        if (

            Aggr(DISTINCT DTCTB,CCOAR,DTCTB)>0 and Aggr(DISTINCT DTCRE,CCOAR,DTCRE)>0

            ,

            Interval(date(date#(Aggr(DISTINCT DTCTB,CCOAR,DTCTB),'YYYYMMDD'),'YYYYMMDD') - date(date#(Aggr(DISTINCT DTCRE,CCOAR,DTCRE),'YYYYMMDD'),'YYYYMMDD'),'d')

        )

    )

    ,NUMORDINE

)


0 Replies