Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

text value condition in IF expression

tryed to display data based on conditions

1) if(Name='House1',Data,0)

OR

2) ({<Name = {'House1'}>} Data)

it wont work, shows only "-".

there is a stupid little mistake somewhere, but in the dokumentation, i only found IF or similar expressions, using nubers, NOT text values.

1 Solution

Accepted Solutions
Not applicable
Author

Using the word "only" at the beginning of the expression has worked for some similar things I have done.

only({<Name = {'House1'}>} Data)

View solution in original post

4 Replies
Not applicable
Author

Try if(lower(Name)='house1',Data,0)

Make sure that the data returned by Name has no other characters or hidden spaces. Values must match exactly.

Not applicable
Author

im sorry, that does not work. may be my example was too fuzzy.

the table is like:

ID; house; name; area; data; (header)

1 ; house1; green; area1; 21; (data part)

its a connection between "ID" and "variable" and value, so there are

variable=house

variable=name

variable=area

variable=data

so its at least 4 times

({<variable = {'f.e. name'}>} value)

so it displays the value for "name". worked fine before (with numbers, not text)

({<variable= {'1'}>} value)

like:

where (variable)='name', display (value)

Not applicable
Author

Using the word "only" at the beginning of the expression has worked for some similar things I have done.

only({<Name = {'House1'}>} Data)

Not applicable
Author

thanks scottmc68,

why does it make such a difference, if 'text' is used in expressions instead of numbers ?

its not even described in the ref guide. all examples there, are using numbers.

this is a majo flaw in the documentation (dev course and ref guide)

1. why is it necessary to alter the expression ? cant we use one for text and numbers ?

2. why is there no example for text conditions ? its used pretty often in pivot tables.

3. why are there no "real" (longer than 2 lines) examples in the ref guide ? after looking up something in the ref guide, examples are only found in the course material.

without the help of the community, QV would be much less usable.

thanks to everyone, you make this grat product usable.