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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ccsimo16
Contributor III
Contributor III

Calculating total

Hi

I have a spreadsheet which looks like

Supplier    Tier      Value     Rebate

A                1              100          1%

B                2            200          5%

C                1             50            1%

D                 2             300          2%

I can calculate each line with no problem by using

=sum (value) * sum(Rebate)

The problem comes when i want to total all rebate by Tier

Thanks

10 Replies
marcus_sommer

It would work without the outer-aggregation like:

aggr(sum(value) * sum(Rebate), Supplier, Tier)

whereby it might be useful to round and or format it or maybe to wrap it with a class-function like:

class(aggr(sum(value) * sum(Rebate), Supplier, Tier), 5)

- Marcus