Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
user467341
Creator II
Creator II

Aggregation based on selected filters

Hi all.

I have two columns in my straight table, call it C1 and C2.

C1 contain the formula SUM(A) / SUM(A)+SUM(B). C1 calculate the percentage total.

C2 contain the same formula, SUM(A) / SUM(A)+SUM(B). However,  I want C2 to calculate the percentage of "House Type", which I have created a filter pane in the app.

Obviously, when I select the "House Type" in my filter pane, both C1 and C2 will calculate and change to the same results.

I need C2 to only perform aggregation if I select the "House Type" from my filter pane, while C1 will remain the same.

How can I achieve this?

Labels (2)
1 Solution

Accepted Solutions
MayilVahanan

Hi

In order to ignore the filter, you can use set analysis

SUM({<Field1=>}A) / (SUM({<Field1=>}A)+SUM({<Field1=>}B))

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

5 Replies
MayilVahanan

Hi

In order to ignore the filter, you can use set analysis

SUM({<Field1=>}A) / (SUM({<Field1=>}A)+SUM({<Field1=>}B))

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
user467341
Creator II
Creator II
Author

Hi Mayil,

What if my formula is this:

SUM({<Field1="bb"}A) / (SUM({<Field1="bb"}A)+SUM({<Field1=bb"}B))

My "House Type" is Field2. How can I add Field2 into the above?

MayilVahanan

Hi

Try like below

SUM({<Field1={"bb"}, Field2=>}A) / (SUM({<Field1={"bb"}, Field2=>}A)+SUM({<Field1={"bb"}, Field2=>}B))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
user467341
Creator II
Creator II
Author

Hi Mayil,

Could you explain what Field2= does? Thank you.

MayilVahanan

Hi

Field2= , its ignore the selections made in Field 2.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.