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: 
scott_simmons
Partner - Contributor
Partner - Contributor

Getting Totals for data outside of the filter

For our sales team we have them setup so that a territory exists with in a region.  We produce reports every week that go out to the territory manager.  So the report is filtered to the territory, I want to show three metrics, the first two are easy it is the third I don't know how to do.

Structure / Roll up:  Company / Region / Territory

Expressions:

1: Sales  = sum(sales)

2: Sales as % of Total = sum(sales) / sum({1} sales)

3: Sales as % of Region = sum(sales) / ?

 

1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try this:

= sum(sales) / sum({1<Territory, Region = {'$(=only(Region))'}>} sales)

View solution in original post

2 Replies
Vegar
MVP
MVP

Try this:

= sum(sales) / sum({1<Territory, Region = {'$(=only(Region))'}>} sales)
Nadi_Clarke
Contributor II
Contributor II

sum(Sales)/ sum(total <Region> aggr(sum(Sales),Region))