Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
cliff_clayman
Creator II
Creator II

How to format decimals using a format pattern on a report

I have a few decimal fields from a SQL table that I need to format in the report.  The user does not want to see the decimals where the value is a round number.  For example, currently a value displays as 100.00 and the user wants to see 100.  However, if the value is 123.45, then I need it to display as 123.45.  Can I handle this on the report?  I  know I can use the Number Format Settings in the Document Properties, but I am not sure what the format syntax would be.

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Then replace them in your Chart Properties with a Calculated Dimension and enter an expression like:

=num([Your Dimension Field])

View solution in original post

3 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

If you use Expression Default from the Numbers tab, you should get integers when no decimals are to be shown, and a floating point value in all other cases.

cliff_clayman
Creator II
Creator II
Author

These aren't expressions.  They are just dimensions I pulled onto a straight table.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Then replace them in your Chart Properties with a Calculated Dimension and enter an expression like:

=num([Your Dimension Field])