Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Decimal and percentage num

Hello;

I have an expression in a chart that equals to say 21.7893 I want to show it as 21.8%, so percentage format with one decimal. How can I do it?

1 Solution

Accepted Solutions
sunny_talwar

May be one of these

Num(Expression, '##.0%')

or

Num(Expression/100, '##.0%')

View solution in original post

6 Replies
ciaran_mcgowan
Partner - Creator III
Partner - Creator III

Num(FieldName, '0.0') & '%'

sunny_talwar

May be one of these

Num(Expression, '##.0%')

or

Num(Expression/100, '##.0%')

ciaran_mcgowan
Partner - Creator III
Partner - Creator III

Make sure you keep the % sign out of the expression or else, it will divide the field value by 100. So for 21.7893:

Num(FieldName, '0.0%') will equal 0.2% (.217893% narrowed down to 1 decimal place)

Not applicable
Author

great, it's Num(Expression/100, '##.0%'). Thanks!

vishsaggi
Champion III
Champion III

Try this:

Num(<FieldName>, '#,##0.0%')

OR

Go to Number tab in properties window, select field name and in number format settings select as below:

Capture.PNG

Not applicable
Author

Hi!

I'm sorry to refloat up this topic but I have a question.

I have one expression with the same configuration format that you, but my result instead 100.0% is 100,000.0% and I don't understand why.

Do you know if it could be a cause of a bad configuration? As curiosity, if I change dots per commas, in expression and number configuration, the result is 100,0%.

Thank you very much!!!!

Edit.: Solved! Setting dots per commas in the script.