Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sqlpuzzle
Contributor III
Contributor III

Unfilter with {1} but not all

I need help with an expression.

I am calculating a ratio.

Sum([total]) / Sum({1} [total]) .  This will calculate the ratio of total “with filters selected” over total “with no filters applied”.

I want to modify it so that instead of calculating the ratio over the unfiltered set in denominator, I want to keep the country filter applied if such a filter is selected by the user.

{1} will eliminate all filters. I want all filters except the Country dimension eliminated. Something like {1 – Country}

How to do this.

A sample is attached.

1 Solution

Accepted Solutions
sunny_talwar

May be this

Sum([total])/ Sum({1<Country = p(Country)>} [total])

or

Sum([total])/ Sum({1<Country = $::Country>} [total])

View solution in original post

1 Reply
sunny_talwar

May be this

Sum([total])/ Sum({1<Country = p(Country)>} [total])

or

Sum([total])/ Sum({1<Country = $::Country>} [total])