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: 
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))