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: 
Not applicable

Include numbers but exclude during calc

I have a number range 1-1000 which I successfully import.

No 15,25,50,75 and 90, I need to exclude from all calculations but later on a seperate sheet display my analysis.

How do I go about doing this.

My statement reads as follows -

If([number] >=1 and [number] <= 10000, 'Valid','Not defined') as d_type

4 Replies
giakoum
Partner - Master II
Partner - Master II

create a flag for these numbers as a new field and use it in set analysis

if([number]=15 or [number]=25 or [number]=50 or [number]=75 or [number]=90, 1, 0) as CalculateFlag

anbu1984
Master III
Master III

If( ([number] >=1 and [number] <= 10000) And Not([number]=15 or [number]=25 or [number]=50 or [number]=75 or [number]=90), 'Valid','Not defined') as d_type

AbhijitBansode
Specialist
Specialist

If(

     ([number]>=1 and [number]<=10000)

     and not Match([number],15,25,50,75,90),

     'Valid','Not defined'

) as d_type

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I am assuming from your post that you want to load these numbers, but exclude them from your calculation(s). Thne use the following set expression to exclude them:

     <number -= {15,25,50,75,90}>

Use it in an expression like this for example:

     Sum({<number -= {15,25,50,75,90}>} amount)

The -= will flag as a syntax error in the expression editor. This is a bug in the syntax check, so just ignore this warning.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein