Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
qv_testing
Specialist II
Specialist II

Set Analysis

Hi all,

I have 1990,1991,1992,1993

i want to display only 1990, 1991 and 1993.

Thanks...

1 Solution

Accepted Solutions
nizamsha
Specialist II
Specialist II

try this

sum({$<year={1990,1991,1993}>}fieldname)

or   this

=sum({$<Year={"*"},Year-={'1992'}>}fieldname)

View solution in original post

5 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

In expression just write the following expression

Sum({<Year={1990, 1991,1993}>} MeasureName)

Hope this helps you.

Regards,

Jagan.

qv_testing
Specialist II
Specialist II
Author

Hi Jagan,

Suppose if i have 100 records,

jagan
Luminary Alumni
Luminary Alumni

Hi,

Just hard code the values in the expression, or arrive a field with flag so that we can exclude based on the flag value.

LOAD

     If(Match(Year, 1990, 1991, 1992, 1993,.................................), 1, 0) AS Flag,

     *

FROM DataSource;

And use the expression below

=Sum({<Flag={1}>} MeasureName)

Regards,

Jagan.

nizamsha
Specialist II
Specialist II

try this

sum({$<year={1990,1991,1993}>}fieldname)

or   this

=sum({$<Year={"*"},Year-={'1992'}>}fieldname)

brijesh1991
Partner - Specialist
Partner - Specialist

Tab1:

Load *,

if(MixMatch(Year,'1990', '1991','1993'),1,0) as Flag

from Table;

Tab2:

Load * resident Tab1 where Flag=1;

drop table Tab1;