# New to Qlik Sense

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

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for
Did you mean:
Contributor II

## Virtual table question

Hi Community!

I am working with a qliksense app that has the information as follows in one of my tables:

 TABLE 1 PERSON 1 PERSON 2 PRODUCTS OBJECTIVE MAX OBJECTIVE JUAN 1 PRODUCT 1 12 12 JUAN 1 PRODUCT 2 2 12 JUAN 2 PRODUCT 3 34 34 JUAN 2 PRODUCT 2 3 34 JUAN 3 PRODUCT 1 12 33 JUAN 3 PRODUCT 3 33 33 JUAN 4 PRODUCT 2 32 64 JUAN 4 PRODUCT 2 64 64 JUAN 4 PRODUCT 3 64 64 JUAN 5 PRODUCT 1 2 54 JUAN 5 PRODUCT 3 54 54

I need to create a new table with person 1 as dimension and need to sumarize the max objective of each Person 2 and show it as a total for Juan.

The result should be summarizing each light blue result and in this case is 197

 PERSON 1 RESULT JUAN 197

I tried with AGGR but without success..

aggr(SUM(Max OBJECTIVE),PERSON 1,PERSON 2)

Will really appreciate your help to sort this out.

Thanks!!!

Sofía

Labels (2)

• ### Aggr Sum

1 Solution

Accepted Solutions
Master

``=Sum(Aggr(Max([MAX OBJECTIVE]),[PERSON 1],[PERSON 2]))``
2 Replies
Contributor II

Hello,

For me, you've two steps :

• First step,  you need to obtain the max value for each value from PERSON 2 dimension:

``MAX(TOTAL <[PERSON 2]> [MAX OBJECTIVE])​``

• Once you're done the first step, you must calculate the aggregated value according each value for PERSON 1 field

``SUM ( AGGR(MAX(TOTAL <[PERSON 2]> [MAX OBJECTIVE])​, [PERSON 1]))​``

Try it and make us any feedback if it works (unfortunately,  I don't try it to ensure me if it works)!

Regards.

Master

``=Sum(Aggr(Max([MAX OBJECTIVE]),[PERSON 1],[PERSON 2]))``