Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
brijeshvma
Partner - Creator
Partner - Creator

How to Write Aggr Function script in Script Editor

Hi All i have a two table in one i have all the dimension and second table have a Aggregated value for the same ..

and both are connected with common field.. But when i do sum(visits) i get wrong output ..

and if i am writing a sum(Aggr(Visits,VisitFull,Date)) Expre. i am getting a correct value .. But because of aggr function it slow down the

application .. so is there any way i can join this table and directly write this expression on script editor .. so on expression by directly

writing sum(visits) it gives proper value .. I am attaching qvd and qvw file .. kinldy check and help me how to achive this....

13 Replies
sunny_talwar

Would you be able to share a smaller sample?

Preparing examples for Upload - Reduction and Data Scrambling

brijeshvma
Partner - Creator
Partner - Creator
Author

Hi Sunny,

Kindly find the attachment.

brijeshvma
Partner - Creator
Partner - Creator
Author

Hi Sunny,

i selected more filter option. now it less than 5 Mb .. !

brijeshvma
Partner - Creator
Partner - Creator
Author

Hi All,

Can any one suggest me how to achieve this ?

brijeshvma
Partner - Creator
Partner - Creator
Author

Hi Sunny ,

Are you able to check the qvw ?

ashishkalia
Partner - Creator
Partner - Creator

Boss it seems data modelling issue. pl look below

Untitled.png

brijeshvma
Partner - Creator
Partner - Creator
Author

Hi Ashish,

I am Having only two table .. one having event level dimension and another is aggregated value for that visits..

So how resolve this ?

ashishkalia
Partner - Creator
Partner - Creator

can you share the data?

with some info regarding wat you are doing?

sunny_talwar

Can you try this script at the end of the script:

Aggr:

LOAD VisitFull,

    Visits

Resident Second;

Left Join (Aggr)

LOAD VisitFull,

  Link_Date

Resident First;

Left Join (Aggr)

LOAD Link_Date,

  Date

Resident [Master Calendar];

TempAggr:

LOAD DISTINCT VisitFull,

  Date,

  Visits

Resident Aggr;

FinalTableAggr:

LOAD VisitFull,

  Date,

  Sum(Visits) as TotalVisits

Resident TempAggr

Group By VisitFull, Date;

DROP Table Aggr, TempAggr;

And use TotalVisits in your chart