Hi,
I have a column containing 100 different animal names.
I would like:
Cat, Dog, Horse, Mouse, Lizzard to retern value 1.
The rest of the animals shall return value 0.
What will the function look like in the expressionbuilder?
Br Bertrand
Hi,
I have a column containing 100 different animal names.
I would like:
Cat, Dog, Horse, Mouse, Lizzard to retern value 1.
The rest of the animals shall return value 0.
What will the function look like in the expressionbuilder?
Br Bertrand
Alternatively, you could make a lookup table with twp columns, containing these names in one column, and a value of "1" in the second column.Code:IIF([Column1]="Cat" or [Column1]="Dog" or [Column1]="Horse" or [Column1]="Mouse" or [Column1]="Lizzard",1,0)
Then, you could do a Left Join between your main table and this lookup table, returning the value of column 2. You can use the NZ function to convert the unmatched nulls to zero, i.e.
Code:Nz([Field2],0)
A better way: IIF([column1] In ("Cat","Dog","Horse","Mouse","Lizzard"),1,0)
Thank you for excellent support.
Later IŽll check "Left Join between your main table and this lookup table"
Br