Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
How to show field values in % format.I have one field which contains values like 20%,45%,2,4,55% etc.. when i select number format as % in qliksense it shows like 20%,45%,200%,400%,55% but its wrong i want to display like 20%,45%,2%,4%,55% etc..
Please help me for getting this.
Thanks in advance.
Regards,
Anusha
Hi Anusha,
You can use the code below as reference for your problem:
[TempOriginalValues]: Load * Inline [ OriginalValue 20% 45% 2 4 55% ]; [Treatedvalues]: Load [OriginalValue], Num(PurgeChar([OriginalValue],'%')/100,'#,##0%') AS [TreatedValue] Resident [TempOriginalValues] ; DROP TABLE [TempOriginalValues];
This will generate this result:
purgechar(fieldname,'%')
This is delete all the percentage fromthe number .
You can use
purgechar(fieldname,'%') /100
and use number format as %
Hi Anusha,
You can use the code below as reference for your problem:
[TempOriginalValues]: Load * Inline [ OriginalValue 20% 45% 2 4 55% ]; [Treatedvalues]: Load [OriginalValue], Num(PurgeChar([OriginalValue],'%')/100,'#,##0%') AS [TreatedValue] Resident [TempOriginalValues] ; DROP TABLE [TempOriginalValues];
This will generate this result: