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

Get Only Two Decimal Values For Output!

Hi,   Consider I'm using the following expression:
=((sum(HCL_AMT_PAYABLE)/sum(HCL_CLM_AMT))*100) ... The output is 99.98956896 something
How can I limit the expression to display
values only till two decimal places (like 99.98).
Suggestions appreciated.
Regards,
Shahbaaz.
7 Replies
Not applicable
Author

Hi,

Use this Expression,

Num((sum(HCL_AMT_PAYABLE)/sum(HCL_CLM_AMT))*100,0.00)

Thanks & Regards,

Parag Patil

Not applicable
Author

Hi Parag,

Thanks, but that does not seem to work. It shows "No data to display" irrespective of selections made.

I tried experimenting with the number format, but in vain.

Regards,

Khaled,

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

=Round(sum(HCL_AMT_PAYABLE)/sum(HCL_CLM_AMT)*100, 0.01)

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Hi Parag,

There are good solutions before my message.

But, perhaps, simply, in the properties, Number-Number Format Settings, Fixed to 2 decimals or Format Pattern #,##0.00

Pierre

pogrebnoymike
Partner - Contributor II
Partner - Contributor II

You should still be able to use the number format, but do not forget the single quotes. Try the following:

=Num((sum(HCL_AMT_PAYABLE)/sum(HCL_CLM_AMT))*100,'#,###.##')

kamalqlik
Partner - Specialist
Partner - Specialist

Hi khaledshahbaaz,

                    1st way----             You can go in the number tab in the chart and than go to then go to number setting formatting

set the value as--fix to 2 decimal places.

or go to the expression

2nd way---Num((sum(HCL_AMT_PAYABLE)/sum(HCL_CLM_AMT))*100,'#,###.##')

    or try

Num((sum(HCL_AMT_PAYABLE)/sum(HCL_CLM_AMT))*100,'#,##0.00')

Hope this wil help you

regards

Kamal

Not applicable
Author

Hello.

Fixing the number format from the settings didn't work but yes, this expression worked.

=(((sum(HCL_AMT_PAYABLE)/sum(HCL_CLM_AMT))*100) ,0.00)

Thanks everyone..!

Regards,

-Khaled