Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
komminenianusha
Partner - Contributor III
Partner - Contributor III

Number format issue

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

1 Solution

Accepted Solutions
marksouzacosta

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:

treatedvalues.png

Read more at Data Voyagers - datavoyagers.net

View solution in original post

3 Replies
agni_gold
Specialist III
Specialist III

Divide these numbers by 100 first and then select % as number format.
pradosh_thakur
Master II
Master II

purgechar(fieldname,'%')  

This is delete all the percentage fromthe number .

You can use

purgechar(fieldname,'%')  /100

and use number format as %

Learning never stops.
marksouzacosta

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:

treatedvalues.png

Read more at Data Voyagers - datavoyagers.net