Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a vairable that has dual values stored in it:
e.g. Var1 = dual('>3 months', 3)
I am trying to write some set analysis:
=count( {< Var1 = {'>3 months', '3-6 months'} >} contacts)
In this scenario, it recognises the '3-6 months' but not the first one - I believe it is because of the > symbol in the text confusing QView. How do I get around this in the expression layer without altering the names of my groups?
Thanks!
GPC
I think you may have meant Field, not Variable? If it is a field, add a wildcard before the < as a workaround.
=count({<Var1={'*❤️ months','3-6 months'}>} contacts)
-Rob
1. You can't use variables that return values on the left side of the = operator in set analysis expressions, only field names or expressions that return a field name.
2. The syntax isn't correct. It's generally something like count( {<FieldName = {'Value'} >} contacts)
Please read these two documents and post an example document:
Sorry I think you may have misinterpreted my question.
Var1 has the following options : new, 1-3 months, >3 months based on an IF statement during the load script.
I set them up as a dual() value so that they easily sort.
So in reality, >3 months is stored as dual('>3 months', 3).
And sorry, I missed a { in my example code, my set statement is:
=count( {< Var1 = {'>3 months', '3-6 months'} >} contacts)
I have uploaded an example - note the 3 text boxes are an attempt to replicate the table - the set with > in it never works because QView gets confused and treats it as an operator even though it's not in ""'s. The red box is the problem one - it should make more sense now
thanks for your help!
GPC
I think you may have meant Field, not Variable? If it is a field, add a wildcard before the < as a workaround.
=count({<Var1={'*❤️ months','3-6 months'}>} contacts)
-Rob
Thanks Rob - exactly what I was after!