Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
sguerra2
Contributor II
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 2PRODUCTSOBJECTIVEMAX OBJECTIVE
JUAN1PRODUCT 11212
JUAN1PRODUCT 2212
JUAN2PRODUCT 33434
JUAN2PRODUCT 2334
JUAN3PRODUCT 11233
JUAN3PRODUCT 33333
JUAN4PRODUCT 23264
JUAN4PRODUCT 26464
JUAN4PRODUCT 36464
JUAN5PRODUCT 1254
JUAN5PRODUCT 35454

 

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 1RESULT
JUAN197

 

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 (1)
1 Solution

Accepted Solutions
Saravanan_Desingh
MVP
MVP

Please try.

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

View solution in original post

2 Replies
sbarro1
Contributor II
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.

Saravanan_Desingh
MVP
MVP

Please try.

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