Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
inescastelhano
Partner - Creator II
Partner - Creator II

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

8 Replies
sunny_talwar

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)

inescastelhano
Partner - Creator II
Partner - Creator II
Author

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

sunny_talwar

This worked?

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

inescastelhano
Partner - Creator II
Partner - Creator II
Author

No, it doesn't work.

sunny_talwar

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

Anonymous
Not applicable

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!!!


inescastelhano
Partner - Creator II
Partner - Creator II
Author

Doesn't work either.

Anonymous
Not applicable

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

Thanks!