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: 
ilanbaruch
Specialist
Specialist

FirstSortedValue with set analysis


hi all,

I have a straight table (best reps) with 1 dimension and 2 expressions

dimension is department, and the expressions are:

1. Rep. Name

FirstSortedValue(REP_NAME, -Aggr(Sum(AMOUNT),DEPARTMENT, REP_NAME))

2. SALES AMOUNT

Max ( aggr ( sum ( AMOUNT ), DEPARTMENT, REP_NAME ) )

I want to add an expression that will sum reps (from expression 1) the quantity  sold,

by default when I add sum(quantity ) it calculates the dimensions quantity.

any ideas?

14 Replies
ilanbaruch
Specialist
Specialist
Author

hi, thank you for your replay,

I tried it with sum, it gives the total quantity of the dimension (department)


Mark_Little
Luminary
Luminary

Hi,

Sorry that me missing understanding.

So what we are trying to achieve is the quantity sold by the best sales person per department?

Do we have some sample data to play with? It is going to be a nested aggregation.

Mark

Kushal_Chawda

not sure but try

FirstSortedValue(Sum({<REP_NAME={"=Aggr(Sum(AMOUNT),DEPARTMENT, REP_NAME)"}>}QUANTITY), -Aggr(Sum(AMOUNT),DEPARTMENT, REP_NAME))

ilanbaruch
Specialist
Specialist
Author

you are correct.

the quantity sold by the best sales person per department.

attached sample to source post

thank you

sunny_talwar

Within your application, where exactly are you wanting to use the required expression??? You have fully loaded application attached and its difficult to find the particular chart.