Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
Partner
Partner

Aggr inside set analysis

Hi all,

Could somebody tell me if there is any problem with this expression? The aggr part is working alone but not when integrated within the set analysis expression.

Only({<FIELD1={'something'}, FIELD2={$(=Aggr(Max(FIELD2), FIELD3))}>}FIELD4)

Thanks in advance.

Cheers,

Inês

Tags (1)
8 Replies
Highlighted

Re: Aggr inside set analysis

You are comparing FIELD2 to an aggregate with a FIELD4? Is this right? Have you checked this in a straight table to see if you see the right information?

Dimension

FIELD2

Expression

=Aggr(Max(FIELD3), FIELD4)

Highlighted
Partner
Partner

Re: Aggr inside set analysis

You are right, my mistake! Should be:

Only({<FIELD1={'something'}, FIELD2={$(=Aggr(Max(FIELD2), FIELD3))}>}FIELD4)


The problem is the same, I only made the mistake when writing the expression here.


Thanks

Highlighted

Re: Aggr inside set analysis

This worked?

Only({<FIELD1={'something'}, FIELD2={$(=Aggr(Max(FIELD2), FIELD3))}>}FIELD4)

Highlighted
Partner
Partner

Re: Aggr inside set analysis

No, it doesn't work.

Highlighted

Re: Aggr inside set analysis

Hahahaha that's what i figured. I think it would be better if you share a sample (dummy data) and the expected output to help you. The expression doesn't look right, but offering a suggestion would be difficult without knowing what you are trying to do.

Best,

Sunny

Highlighted
Valued Contributor III

Re: Aggr inside set analysis

Hi Ines,

If you want the Max of Field2 based on Field3, then use :

     Only({<FIELD1={'something'}, FIELD2={$(=Max(Aggr(Max(FIELD2), FIELD3)))}>}FIELD4)


Else, if you wan Max value of Field2 for each Field3, then use:

     Only({<FIELD1={'something'}, FIELD2={$(=Concat(Aggr(Max(FIELD2)),FIELD3),','))}>}FIELD4)


Regards!!!


Highlighted
Partner
Partner

Re: Aggr inside set analysis

Doesn't work either.

Highlighted
Valued Contributor III

Re: Aggr inside set analysis

Hi Ines, could you attach one example of your data?

Thanks!