1) you can, as mentionned by Anul, use hash on ur fields to "scramble"; but this is not very secure if some users have access to the script..
2)Scrambling via the Dev-Hub in qlik sense
Please refer to this:
3) scramble in qlik sense - extension:
I think you can also store the used KPI into a Master Measure, and write a Security rule, which gives access to this KPI only to specific users which you have allocated to a group.
My rule is
((user.@AppLevelManagement="Sales") and (resource.objectType!="measure" or resource.name="SalesSum" or resource.name="RegionsCount"))
In this Rule, i have stated that, all people which belong to the Custom Property "Sales", can see the measures "SalesSum" and the measure "RegionsCount".