Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Esli_Araujo
Contributor
Contributor

Use Value from dimension in same row into expression

Example data


LOAD * INLINE [
EXECUTER, SUPPLIER, PRODUCT, VALUE
ANA, ANA, A, 1
ANA, JOHN, A, 1
ANA, ANA, A, 1
JOHN, ANA, B, 1
ANA, ANA, B, 1
ANA, ANA, B, 1
JOHN, ANA, B, 1
];

Expected Result

EXECUTEREXECUTED TOTAL ASUPPLIED TOTAL B
ANA34
JOHN00



I tryed to use this set analisys but dont achieved the desired result for product 'B' value
sum({$<EXECUTER = P({1<PRODUCT = {'B'}>} SUPPLIER)>} VALUE)
also tried
If(SUPPLIER = Above(EXECUTER,0),Sum({$<PRODUCT = {'B'}>} VALUE))

and did not work as well =(

basically, what I need is that in my chart, on the row where 'ANA' is the executer, return the sum 'A' product values where 'ANA' is executer,
and the sum of 'B' product values where 'ANA' is the supplier

 

Ps.: Sorry if you found any grammatical error, English it's not my native language 🙂

Labels (4)
1 Solution

Accepted Solutions
lucasjsantos
Contributor II
Contributor II

Try This:

EXECUTED TOTAL A:

SUM(Aggr(sum({<PRODUCT = {'A'}>}VALUE), EXECUTER))

SUPPLIED TOTAL B:

SUM(Aggr(sum({<PRODUCT = {'B'}>}VALUE), SUPPLIER))

 

 

View solution in original post

1 Reply
lucasjsantos
Contributor II
Contributor II

Try This:

EXECUTED TOTAL A:

SUM(Aggr(sum({<PRODUCT = {'A'}>}VALUE), EXECUTER))

SUPPLIED TOTAL B:

SUM(Aggr(sum({<PRODUCT = {'B'}>}VALUE), SUPPLIER))