FieldValue() and FieldIndex() are used to get the values or the index of a dimension. For example
Country
India
USA
UK
Russia
Fieldindex( 'Country', 'USA' )
Will give you the value 2, because USA is in second position.
FieldValue('Country', 2)
Will give you the value USA, because second value in the Country dimension is USA.
From Qlikview help file:
Fieldvalue(fieldname , n)
Returns the field value found in position n of the field fieldname (by load order). Fieldname must be given as a string value, e.g. the field name must be enclosed by single quotes. The first field value is returned for n=1. If n is larger than the number of field values, NULL is returned.
Example:
fieldvalue( 'Helptext', 5 )
FieldIndex(fieldname , value )
Returns the position of the field value value in the field fieldname (by load order). If value cannot be found among the field values of the field fieldname, 0 is returned. Fieldname must be given as a string value, e.g. the field name must be enclosed by single quotes.