Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

{<FIELD=>} not working in AGGR() function

Hello,

I am using count of FIELD1 across dimension FIELD and using AGGR() to do group by of FIELD2,FIELD3,FIELD4 in a chart. Also i have used {<FIELD=>} as the set modifier so that the selection in FIELD should not reflect in chart. The chart is working unless i don't make a selection in FIELD. As soon as selection is done in FIELD, the chart changes according to the selection thus ignoring the set modifier {<FIELD=>}.

Can someone explain the reason of this different behaviour.

Expression - count({<FIELD=>} AGGR(FIELD1,FIELD2,FIELD3,FIELD4))

Also AGGR(count({<FIELD=>} FIELD1),FIELD2,FIELD3,FIELD4) is not fetching any result, so i used the above expression.

1 Solution

Accepted Solutions
MVP
MVP

Re: {<FIELD=>} not working in AGGR() function

SUM({<FIELD = >}Aggr(COUNT({<FIELD = >}FIELD1),FIELD2, FIELD3, FIELD4))

10 Replies
MVP & Luminary
MVP & Luminary

Re: {<FIELD=>} not working in AGGR() function

Why are you using the aggr function? What are you trying to calculate?


talk is cheap, supply exceeds demand
MVP & Luminary
MVP & Luminary

Re: {<FIELD=>} not working in AGGR() function

Hi,

Try like this

Sum({<FIELD=>} AGGR(count(FIELD1),FIELD2,FIELD3,FIELD4) )


Hope this helps you.


Regards,

Jagan.

MVP
MVP

Re: {<FIELD=>} not working in AGGR() function

Looking wrong !

count({<FIELD=>} AGGR(FIELD1,FIELD2,FIELD3,FIELD4))


What you are Counting?


Can you provide sample app or data?

MVP
MVP

Re: {<FIELD=>} not working in AGGR() function

If you want to ignore the selection in FIELD, you should consider using a set expression in the inner as well as the outer aggregation.

count({<FIELD=>} AGGR( only({<FIELD=>} FIELD1), FIELD2,FIELD3,FIELD4))

I am not sure if using only() is what you really want here, but it exactely the same inner aggregation you are using in your original (working without selections) expression.

If you want more help, post more details about the context.

Not applicable

Re: {<FIELD=>} not working in AGGR() function

its actually counting FIELD1 and then aggregating on FIELD2, FIELD3,FIELD4

Not applicable

Re: {<FIELD=>} not working in AGGR() function

Thanks Jagan!

Unfortunately, this expression also is not preventing the expression to change it's value on selection of FIELD.

Can you come up with some other alternate solution.

Not applicable

Re: {<FIELD=>} not working in AGGR() function

Gysbert,

i am calculating count of FIELD1 and aggregating on FIELD2, FIELD3.... while keeping the value of FIELD constant.

MVP
MVP

Re: {<FIELD=>} not working in AGGR() function

SUM({<FIELD = >}Aggr(COUNT({<FIELD = >}FIELD1),FIELD2, FIELD3, FIELD4))

Not applicable

Re: {<FIELD=>} not working in AGGR() function

Thanks a ton Manish!

It worked.

thank you so much.