Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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.
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
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.
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.
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...