Here are a few things I strongly suggest in working with Qlik key fields.
- Make separate key fields*
- Prefix the field with %
- Set HidePrefix variable to %
- Use AutoNumber
Because of how the association engine works, you should never use a key field in an expression. It can return some very unexpected results. So to handle this, you should make a duplicate field to handle the association and then use the other field in your expressions.
Here is a visual of what I mean: