Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

Script Wise Sum

Hi All,

How Can we done Script wise Sum ,i know about the Dashboard we can able to apply sum function

Plz explain me how can we do in Script wise

Thanks in Advance

Niranjan

1 Solution

Accepted Solutions
amars
Specialist
Specialist

Hi Niranjan,

Write it in this way,

Load ID, sum(sales) 

from table.qvd group by ID;

so the above will give sum for each ID,

If you do not have any Group by Clause , u can simply write,

Load sum(sales) from table.qvd ;

For more please see the file attached

Amar

View solution in original post

7 Replies
sivarajs
Specialist II
Specialist II

Sum aggregates towards dimension in chart ,while in sciprt we need to use group by field name for the aggregation

Load sum(sales)

from table.qvd group by ID;

If you are loading all the fields while summing you need to give all the fields in group by function.

So it better you always calculate in seperate load and field you are going to aggregate like the above example.

NavinReddy
Creator II
Creator II
Author

Hi Sivaraj ,

Thanks a lot its helpful for me

Thanks & Regards

Niranjan

NavinReddy
Creator II
Creator II
Author

Hi Sivaraj ,

I tried but example is not working will you please give

any other example

Thanks in Advace

Niranjan

amars
Specialist
Specialist

Hi Niranjan,

Write it in this way,

Load ID, sum(sales) 

from table.qvd group by ID;

so the above will give sum for each ID,

If you do not have any Group by Clause , u can simply write,

Load sum(sales) from table.qvd ;

For more please see the file attached

Amar

sivarajs
Specialist II
Specialist II

Check the attached file

NavinReddy
Creator II
Creator II
Author

Hi amars,

Thank you very much its working fine,nice explanation amars

Thanks & Regards

Niranjan

NavinReddy
Creator II
Creator II
Author

Hi Sivaraj,

yes it is also working fine,great job

thank you so much

Thanks & Regards

Niranjan