It cannot be achieved directly but we can do a workaround for that.
1. You need to create an inline table with the format specifier
Text(value) as value; //It is necessary to convert this to text, otherwise Qliksense will treat it as number
LOAD * INLINE [
2. In chart use below Expression,
if(Metric='Contribution',num(Count([Key1])/Count(Total Key1), '$(=Fmt)'),
3. Add a list in a sheet for Metric field,
Based on the selection in the Metric field the chart will be showing the Measure in corresponding format specifier.
This might not be the best solution... Because selecting in a list box is not like Qlikview. Every time it asks to confirm.