Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
deep2021
Creator III
Creator III

Moving aggregations to qlik scripting side

Hi All,

Can you please suggest how to move below calculations in qlik scripting side?

sum(aggr(if(sum([AAgg.#_of_records])=0,1,0),E.entitlementGroup))
sum( aggr(if(only({<E.status={'ACTIVE'}>}E.accountType)='Service Account',1,0),E.entitlementGroup))

 

I have many expressions like this.

Need some advice.

 

Thanks

 

Labels (3)
3 Replies
Bill_Britt
Former Employee
Former Employee

Hi, 

It would be somthing like this sum(aggr(if(sum([AAgg.#_of_records])=0,1,0),E.entitlementGroup)) as [Aggregated Value]

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
deep2021
Creator III
Creator III
Author

Hi,

Thanks for the response,

Can you please suggest how the second expression can be written at the scripting side?

sum( aggr(if(only({<E.status={'ACTIVE'}>}E.accountType)='Service Account',1,0),E.entitlementGroup))

Thanks

MayilVahanan

Hi

Try like below

Load E.entitlementGroup, Sum(if(E.accountType='Service Account',1,0)) as ServiceAccountInfo resident yourtablename where E.status='ACTIVE' group by E.entitlementGroup;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.