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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

using aggr with set analysis

I need to use aggr in the set analysis for sum.. existing is my syntax

sum({<[Referred to CPS] ={'Y'},Application={'HSBCNET'},[Service Lines]=,Month=,Weekstart=>}Aging_Sum)/count({<[Referred to CPS]={'Y'},Application={'HSBCNET'},[Service Lines]=,Month=,Weekstart=>}[Aging Buckets])

I need to put aggr as below but this is giving an incorrect syntax.. Need to group the sum by TR

sum(aggr({<[Referred to CPS] ={'Y'},Application={'HSBCNET'},[Service Lines]=,Month=,Weekstart=>}Aging_Sum), TR)/count({<[Referred to CPS]={'Y'},Application={'HSBCNET'},[Service Lines]=,Month=,Weekstart=>}[Aging Buckets])

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Sum({<[Referred to CPS] ={'Y'},Application={'HSBCNET'},[Service Lines]=,Month=,Weekstart=>} Aggr(Only({<[Referred to CPS] ={'Y'},Application={'HSBCNET'},[Service Lines]=,Month=,Weekstart=>}Aging_Sum), TR))/Count({<[Referred to CPS]={'Y'},Application={'HSBCNET'},[Service Lines]=,Month=,Weekstart=>}[Aging Buckets])

View solution in original post

3 Replies
Anonymous
Not applicable
Author

try (Change sum(aggr)

aggr(sum({<[Referred to CPS] ={'Y'},Application={'HSBCNET'},[Service Lines]=,Month=,Weekstart=>}Aging_Sum), TR)/count({<[Referred to CPS]={'Y'},Application={'HSBCNET'},[Service Lines]=,Month=,Weekstart=>}[Aging Buckets])

sunny_talwar

May be this:

Sum({<[Referred to CPS] ={'Y'},Application={'HSBCNET'},[Service Lines]=,Month=,Weekstart=>} Aggr(Only({<[Referred to CPS] ={'Y'},Application={'HSBCNET'},[Service Lines]=,Month=,Weekstart=>}Aging_Sum), TR))/Count({<[Referred to CPS]={'Y'},Application={'HSBCNET'},[Service Lines]=,Month=,Weekstart=>}[Aging Buckets])

Anonymous
Not applicable
Author

Thanks Sunny.. Why has the Set analysis used twice i.e. before Aggr and again with Aggr ?