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: 
Not applicable

showing the subtotal for an expression in each line

Hi,

We track the sales of staff on counters in a department store. Some sales can be made by staff not assigned to that particular counter as the customer has walked to a different counter to pay or the counter is unmanned and different counter staff make the sale.

We refer to this as intersell and on the following report it isnt assigned to any particular sales person but to a MISC line.

At present the intersell for a particular counter is on a seperate line but I want to capture and show the total intersell for the counter next to each salesperson as well.

In the attached example I want to add the column called "Store Intersell Total" but don't know how to make it work

Thanks

David

[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/0636.intersell.xls:550:0]

2 Replies
Not applicable
Author

I'm assuming you already have the column Intersell in your table, and if this is the case then I'll further assume that the label name of the column is Intersell, in this case the expression for Store Intersell Total should be:

=RangeSum(Above([Intersell],0,RowNo()))

The rangesum function executes the sum of a range of values.

The above function says take the value (the first parameter) starting at row number (2nd parameter - 0 is the current row, 1 would be the row above) for a number of rows (3rd parameter - RowNo() inidcates the current row and in this context means sum up all rows.

Good luck,

Not applicable
Author

Thank you for sharing.