7 Replies Latest reply: Jul 10, 2014 9:32 AM by Александр Закревский

# Difficulties understanding intersection in set analysis

Is there a difference between the results of

```Count({\$<Field1={'a','b'},Field2={'b','c'},Field3={'c','d'}>}ID
```

and

```Count({\$*<Field1={'a','b'}>*<Field2={'b','c'}>*<Field3={'c','d'}>}ID
```

I thought that the statements are equal, but my qlik tells me, i'm wrong. What do I miss? Thanks in advance!

• ###### Re: Difficulties understanding intersection in set analysis

Try this as second expression :

Count({\$*<Field1={'a','b'}*Field2={'b','c'}*Field3={'c','d'}>}ID  )

let me know

• ###### Re: Re: Difficulties understanding intersection in set analysis

The result is Null. And someting wrong is with parts' recognition - the expression editor doesn't highlight "ID" as a field any more. It became black. The real expression is:

```Count({\$*<[Результат по условиям членства Т]={'Не Соответствуют'}>*<[Результат Т]={'Отрицательный акт','Непредоставление'}>*<[Фактическая дата акта Т]={"\$(= '>=' & date(IFr) & '<=' & date(ITo))"}>} CID )
```

if it makes any difference...

• ###### Re: Re: Difficulties understanding intersection in set analysis

close < > only at the start and at the end not for each subset ...

• ###### Re: Re: Re: Difficulties understanding intersection in set analysis

```Count({\$<[Результат Т]={'Отрицательный акт','Непредоставление'}*[Результат по условиям членства Т]={'Не Соответствуют'}*[Фактическая дата акта Т]={"\$(= '>=' & date(IFr) & '<=' & date(ITo))"}>} CID )

```

the result in my chart became Null and the trailing 'CID' turned it's color from red to black (that means it is not trated as a field. And with '*' after \$ - Null as well

• ###### Re: Difficulties understanding intersection in set analysis

Could you please send me the document?

I've tried with an example of mine and it works ...

• ###### Re: Difficulties understanding intersection in set analysis

I can't send the whole file - it's quite big and contains sensitive info. So I'll try to cut the info and leave only the problem area.

And while I'm trying to take my data apart, baybe you can explain IN GENERAL, what's the difference between writing the conditions one by one with commas and separating them with angle brackets and intersecting with '*'? Or point a doc describing it...

• ###### Re: Re: Difficulties understanding intersection in set analysis

I've composed a sample. But it behaves weird. It denies your variant (shows NULL), but my two are displayed equal. I suspect that it may be caused by non-latin symbols in the names of fields. I've already faced such strange behaviour of Qlik earlier and it forced me to rename all the fields in latin-like way. If it is so for the current project, it is much worse, as the whole solution is really big, and it'll take  much time to rename it all..