Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I would like to do a sum(aggr())in script if possible since my pc is really slow in doing further calculation based on that.
Case like. I have a list of ID, all with there teams. example:
ID, team, fee
1,A,3
2,B,5
3,A,8
etc.
There are about 200000 unique ID and 4 teams. How can I add up all fees belonging to the same team in script, but not using aggr/partial sum in pivot table.
Many thanks,
Ivan
SumFees:
LOAD
team,
sum(fee) as "Total Fee"
RESIDENT data
GROUP BY team
;
-Rob
Proabably what you can do is write SQL and make a new field to get the sum using group by statement (cretea a new temp table and use join to attach to the original table). use avg(newfle) in the pivot table- carefull it should pivot on the same group else you will have differnt answer.
SumFees:
LOAD
team,
sum(fee) as "Total Fee"
RESIDENT data
GROUP BY team
;
-Rob
Hi Rob,
Thanks to your suggestion. It's work. However, I have something similar here that fields are not from one table, fields are from several tables which linked in Qlikview. I try to use 'from field' to do it. But there is something wrong....
Regards,
Ivan