Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

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
Highlighted

May be try this:

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

Highlighted
Creator III
Creator III

did not work

: (

Highlighted

Like below!!

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

Highlighted
Champion
Champion

try like:

=sum({<REP_NAME={'*'}>} quantity)

Highlighted
Creator III
Creator III

hi , it gives me the dimension quantity (department),

I need the reps quantity from expression 1


Highlighted
Champion
Champion

Change the dimension, take REP_NAME as Dim and Expression wud be =sum(Quantity)

Highlighted
Creator III
Creator III

hi,

thank you for your effort,

this Expression retrieve the max quantity of the department, I need the quantity of the rep in Expression 1

Highlighted
Partner
Partner

Hi,

Is it not similar to what Tamil suggested, just replace the max with sum


sum(aggr (sum ( Quantity ), DEPARTMENT, REP_NAME ) )


Mark

Highlighted

Then try with Sum instead of Max (Mentioned by Mark).