fix bug in max value on joined fields
Merge pull request #1083 from Oslandia/fix_max_on_joined_fields

fix bug in max value on joined fields