Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

need help on set analysis expression

Hi Team,

I need to write a set analysis expression which is having four conditions on single  field year .

conditions are.Field :Year

Year>=CNT start Year,Year<=CNT end year,Year>=MKT Start Year and Year<=MKT end Year.

Please help on this.

Thanks in advance,

Nani

7 Replies
swuehl
MVP
MVP

Should the two year intervals be combined using AND or OR logic?

Anonymous
Not applicable
Author

are you going to get a single value for CNT start Year in any variable if yes you can use set analysis . if you want to use CNT start Year etc as column here you can not use set analysis as set analysis is not for row level comparison


Thanks

BKC

Not applicable
Author

Hi Swuehl,

Thanks for your response.

using AND logic,Because year field has to satisfy all the conditions.

Thanks.

Nani

Kushal_Chawda

what is CNT Start Year , CNT End Year & MKT Start Year,MKT End Year? Is this fields or variables?

swuehl
MVP
MVP

And since you want to apply set analysis, these year ranges are valid for chart, not per dimension line, right?

Set analysis is evaluated once per chart, not per dimension.

Then try a set expression like this applied to your aggregation functions:

<Year = {">=[CNT start Year]<=[CNT end year]"}>*<Year = {">=[MKT Start Year]<=[MKT end Year]"} >}

Not applicable
Author

Hi BalKumar,

Thanks for the response.

My actual requirement is to get the count of ID's which satisfies the above conditions.

i have ID field and Year filed which is data island.

And each ID has its own CNT start year, CNT end Year , MKT start Year and MKT end Year

If i select 2014 in Year field, i have to get count of id's which are  having 2014 in between "CNT start year, CNT end Year" and between "MKT start Year and MKT end Year".Both conditions have to be fulfilled.

Thanks,

Nani.

Not applicable
Author

HI Kush,

They are Fields.....