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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis: {"*"} vs. {*} vs. {'*'}

Hello community,

I read this document about set analysis: Set Analysis: syntaxes, examples...

------------------------------------------------------------

I know, there's a difference between

Dimension = {"*"}

(--> every value is selected, so null() is not within the selection)

and

Dimension=

(--> means: no selection, so I can see all fields including null())

------------------------------------------------------------

But sometimes I see {'*'} or {*}


In the document I mentioned, I can find the following explanation:


But this makes no sense to me, because a dual() value can't be null() for text representation and not null() for the numeric representation and vice versa or am I wrong?

I tested it with an example:

LOAD Dual('CDEFG',12345) as Field
AutoGenerate (1);

LOAD Dual('ABCDE',null()) as Field
AutoGenerate (1);

LOAD Dual(null(),55222) as Field
AutoGenerate (1);

--> result is only one dual value at all:

So is there any difference between {"*"} and {*} and {'*'} ?

{'*'} looks very strange to me. It should be a string, not a wildcard?!?

(Using QV 11.2 SR15)

Regards

Robin

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I think you should use a search with a star symbol wildcard like {"*"}

A search expression should be encapsulated using double quotes.

{'*'} should be avoided, according to HIC. Single quotes denote a literal string, not a search.

BUT, it will work using the single quotes, because there is a bug in QV that you can use a search expression also using the single quotes (again, quoting HIC).

{*}

I haven't used this.

View solution in original post

5 Replies
swuehl
MVP
MVP

I think you should use a search with a star symbol wildcard like {"*"}

A search expression should be encapsulated using double quotes.

{'*'} should be avoided, according to HIC. Single quotes denote a literal string, not a search.

BUT, it will work using the single quotes, because there is a bug in QV that you can use a search expression also using the single quotes (again, quoting HIC).

{*}

I haven't used this.

Anonymous
Not applicable
Author

So there seems to be no difference between the 3 variants.

But fields containin a *-sign could lead to problems:

LOAD * INLINE [
Field, Value
A12345*, 10
A123456, 20
]
;

This behaviour isn't comprehensible for me...

Until now I thought, I can use "A12345*" for wildmatching and 'A12345*' for matching

swuehl
MVP
MVP

Right, due to the 'bug' in QV, string literal matching is not working correctly, 'A12345*' will be interpreted as a search string containing wildcard *

If you need to match the value 'A12345*', you can try

{"=Field='A12345*'"}

or

{"=Index(Field,'*')"}

i.e. using expression search / advanced search.

Anonymous
Not applicable
Author

it's even worse,  have a look at the example above:

'A12345*' --> matching without wildcard --> 1 line in the diagram

'A1234*' --> matching with wildcard --> 2 lines in the diagram

regardless of wheter using single or double quotes.

swuehl
MVP
MVP

I believe the search is trying different search strategies with the goal to return anything, avoiding returning nothing if possible.

It seems that 'A12345*' is indeed matching the value, so this value is returned.

'A1234*' is not matching a single value, so the search is expanded to find the matching values using the wildcard.

Note that '*' is not finding the single character value only.

As I've noticed several times, the search feature in Qlik  is IMHO one of the worst documented and thus also understood feature...