Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

To Use AGGR or TOTAL

Hi


I have a set of data as below.

     

Sales No.SalespersonProduct name                  $          Multiplier      $ aft multiplier
3505aahearts3,5701                3,570
7417aaspade16,7842.5              41,960
8279aaspade3,6022.5                9,004
9794aahearts3,3971                3,397
6541bbspade3,0052.5                7,511
1800bbhearts3,8031                3,803
1824bbhearts3,8781                3,878
1325cchearts6,8791                6,879
3427ccspade7,2612.5              18,153

I would like to show the above in a pivot table in a chart of each salesperson the total sales they have done after the multiplier.

Salesperson        $aft multiplier
aa              57,931.00
bb              15,192.00
cc              25,031.00

I have tried using AGGR funtion and TOTAL  separately but to no avail. Is it that I have to sum or condition it by the Multiplier. If so how do I that?

Could someone advise on the correct use of AGGR in this case and my TOTAL use for this as well?

Some expressions that I have tried that doesnt work

Sum($)*Multiplier

Sum(TOTAL <[Salesperson]> $)

AGGR(sum($),[Salesperson])*Multiplier

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

What about

=Sum( [$] * Multiplier )

in a chart with dimension Salesperson.

If that doesn't work, then please describe your data model a bit closer, and post some sample data.

View solution in original post

5 Replies
sunny_talwar

Try this

Sum($*Multiplier)

swuehl
MVP
MVP

What about

=Sum( [$] * Multiplier )

in a chart with dimension Salesperson.

If that doesn't work, then please describe your data model a bit closer, and post some sample data.

sunny_talwar

Sample attached

Capture.PNG

Anonymous
Not applicable
Author

stalwar1

swuehl

Hi

I am trying one step further to aggregrate the total salesperson $(based on sales with multiplier) at firm level. I have expanded my data as below.

How do I get the total qualifiers at firm level after the above has been achieved?

  

Sales No.SalespersonProduct name$MulitplierFirm Name
3505aahearts3,5701.0Aces
7417aaspade16,7842.5Aces
8279aaspade3,6022.5Aces
9794aahearts3,3971.0Aces
6541bbspade3,0051.0Brook
1800bbhearts3,8031.0Brook
1824bbhearts3,8781.0Brook
1325cchearts6,8791.0Aces
3427ccspade7,2612.5Aces
3795eehearts4,5001.0Dice
4568eespade7,0002.5Dice
5398ffspade5,0002.5Dice
6756ffspade8,7002.5

Dice

Qlikimage.jpg

The criteria is if the salesperson achieves more than $20,000, it will be considered as one qualifier for the firm.

in this case, there should be 2 qualifiers each from Aces and Dices.

Is this expression correct to do the aggregration?

if(sum(*(if(='spade',2.5,1)))>'20000',1,0)

Thanks

swuehl
MVP
MVP

Maybe something like this, using advanced aggregation

=Sum( Aggr( If( Sum( [$]*[Multiplier]) > 20000, 1,0), Firm, [Salesperson]))

or this using an advanced search in a set expression

=Count({<[Salesperson] = {"=Sum( [$]*[Multiplier]) > 20000"}>} DISTINCT [Salesperson])

Double check that the field names are spelled exactely like in your model.