Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, i want to make an expression like "SQL Not In sentence".
i.e. "Select field From table Where key not in(value1,value2,..valueN)"
i've been reading about and i found "<{}>", but i can't understand how it works.
may somebody help me to undesrtand it please?.
Now is clear!
The only way to replace an if is:
if(Wildmatch(field,'x','y','z')=0, otherField)
The syntax you have seen is called set analysis and is used in expression, not in script, you request is performed by:
Load *
where wildmatch(Key, 'value1','value2',..'valueN')=0;
Select field From table;
Remember the ";" at the end of the load
This is called "set analysis" and it is how QV filters data in aggregation expressions without making explicit selections in the dashboard.
For instance, if I wanted to take the SUM of the field SALES, but not including PRODUCT values 1, 2, and 3 you could do something like this:
SUM({$<PRODUCTS -= {'value1', 'value2', 'value3'}>} SALES)
Things to note are that you can only do this in aggregated expressions (you can get similar functionality out of nested if statements). I suggest you take a look at the QV reference manual, and I've added a link below to a great tool called the Set Analysis Wizard which makes things a little easier.
Thanks Alessandro, but i want to make it into an expression
may you explain me that please?
Ragards.
Select * From TableName
Where Not WildMatch(Key, 'value1','value2',..'valueN');
Expressions (and dimensions) are usen in visual objects like tables, chart, text boxes and so on, what you are trying to do is loadind data from a source using a condition. it is not possible to load data in objects taht is in expression
I'm trying to make this into an chart expression "if( field<>'x' and field<>'y' and field<>'z', otherField)"
i only want to make it shorter because there are many comparisons inside it.
Thanks!
Now is clear!
The only way to replace an if is:
if(Wildmatch(field,'x','y','z')=0, otherField)
Ok many thanks!