Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor

Set Analysis - using with sum(aggr(count

Hi,

I have a chart in my application which uses the following expression and works great.

sum(aggr(count(distinct CONTRACT_ID),C_MCH_CODE,C_MONTH))

However - what I would like to do is stop  this expression being a affected by the selection of a certain field (that field being a date called "task_end" )

I can sucessfully do this to a certain point by using :

sum({$<[TASK_END] = >}distinct CONTRACT_ID))

However when I try to include the aggregation and count to the formula  I cant seem to get the set analysis to stop the "task_end" field from affecting my expression.

Any help would be greatly appreciated!

Thank you!

Bryan

1 Solution

Accepted Solutions
Partner
Partner

because of the second calculation for aggregation fields you have to exclude selection in field TASK_END also

 

sum({$<[TASK_END] = >} aggr(count({$<[TASK_END] = >} distinct CONTRACT_ID),C_MCH_CODE,C_MONTH))

 

 

View solution in original post

2 Replies
Partner
Partner

because of the second calculation for aggregation fields you have to exclude selection in field TASK_END also

 

sum({$<[TASK_END] = >} aggr(count({$<[TASK_END] = >} distinct CONTRACT_ID),C_MCH_CODE,C_MONTH))

 

 

View solution in original post

Contributor
Contributor

Hi Martin,

Thanks for your quick reponse - makes perfect sense and worked great.

 

Regards

 

Bryan