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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Whales
Contributor
Contributor

Filter Selection Not To Affect Rows

I have a small data that I wish to compute some other measures:

Year

Month

Continent

Country

GDP

1999

6

Asia

China

5000

1999

6

Asia

Japan

3000

2000

7

Asia

Japan

8000

2000

8

Africa

South Africa

5000

 

I wish to compute the Continental GDP and Percentage GDP. I computed using the following:

Continental GDP = SUM(TOTAL <Year, Month, Continent> Sales)

Percentage GDP = SUM(TOTAL <Year, Month, Continent> Sales)/SUM(TOTAL <Continent> Sales)

I got the following: 

Continental GDP

Percentage GDP

16000

50.0%

16000

50.0%

16000

50.0%

5000

100.0%

 

However, I want a situation whereby if I filter on the Month and Year, that the filter will still not affect the rows. I want an output like this after selecting Year 1999 and Month 6:

Year

Month

Continent

Country

GDP

Continental GDP

Percentage GDP

1999

6

Asia

China

5000

16000

50.0%

 

Is there a way I can adjust my formular(s) to achieve this above output?

Thank you.

Labels (4)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

As below, changes highlighted

 

=Sum( Aggr (
sum( {< Year=,Month=>} TOTAL <Year,Month,Continent> GDP)
/
sum( {< Year=,Month=>} TOTAL <Continent> GDP)
,Year,Month,Continent,Country))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

2 Replies
vinieme12
Champion III
Champion III

As below, changes highlighted

 

=Sum( Aggr (
sum( {< Year=,Month=>} TOTAL <Year,Month,Continent> GDP)
/
sum( {< Year=,Month=>} TOTAL <Continent> GDP)
,Year,Month,Continent,Country))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Whales
Contributor
Contributor
Author

Thank you. This works pretty well!