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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis (always include all except certain records)

Hi,

I am trying to calculate a value which I do not want to be affected by any selections made by the user. I always want it to calculate based on all the records.

This one below works fine and whatever selection the user makes, the calculated number stays the same:

sum({1}[Amount])/sum({1}[Quantity])

I then inserted a parameter like this:

sum({1}{<[Quantity]={">0"}>}[Amount])/sum({1}[Quantity])

The expression above calculates correctly the way I want it to. However if a user makes a selection, the value changes, which I do not want. I want it to stay fixed.

Any help? Thanks!

Attached file for reference.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

You are almost there. Just need to correct brackets. Try:

=sum({1<[Quantity]={">0"}>}[Amount])/sum({1}[Quantity])

View solution in original post

2 Replies
tresesco
MVP
MVP

You are almost there. Just need to correct brackets. Try:

=sum({1<[Quantity]={">0"}>}[Amount])/sum({1}[Quantity])

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this,

=sum({1<[Quantity]={">0"}>}[Amount])/sum({1}[Quantity])

Remove the Extra {} from expression.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!