
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Round off number giving incorrect results qliksense
Hello All,
I have below table in qliksense:-
For "vs Target" column my measure is Column (1) - Column(2) (i.e 99.9-99.9). But the result is coming in -0.0. Although , it should show simple 0.0 .
As I am using vizlib , we have selected to showcase the negative numbers in parenthesis.
So, I changed the number formatting of the columns and selected to show "2 decimal places " like below :-
Now it gives me the below output :-
The negative sign is removed.
But my requirement is to show the numbers in single decimal . However, it is causing issue. Not sure , how to resolve this ?
Can anyone please help ?
Thanks in advance.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Change your expression to
Round(Column (1) - Column(2), .1)
Alternatively, you may want to apply Round to your Actual & Target expressions instead.
-Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @rwunderlich
When I apply the round function , it is showing me 0.0 .
However , the output should be a negative number (99.86-99.87= -0.01). After applying round off the output is coming 0.0 without negative sign. In my expression we have set in the setting that negative number should be displayed in parenthesis , So my out out -0.01 should display as (0.01) and if we apply round off , it should come (0.0).
But since i am applying round off in my actual and target expression , it shows numbers as :-
99.9 -99.9
and the target expression comes as 0.0 (column 1 -column 2) which is correct.
But i want to show the out put as -0.01

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
While I understand what you're going for, you need to be careful on rounding and dropping those values. The values are computed correctly in the Qlik engine before being presented. A cautionary tale: https://www.linkedin.com/posts/switch-rcm_underpayments-ai-undercharging-activity-689179640620688589...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
when you use Column. you will exactly calculate with the shown values.
speaking clear: if you user Round(Sum(X)) in your column 1 and Round(Sum(Y) in column 2.
column 1-column2 will calculate exactly the difference of the rounded values.
What you want to display instead is on the one hand: the rounded values in the columns, but the more correct value in the difference column. So you have to use the original formulas instead of column:
round( Sum(x)-Sum(y), 0.001) or whatever accuracy you need.
the display of -0.0 is correct and important, since it is a notice to the user that there is in fact a negative outcome, but due to the format it is rounded to zero. so 0.0 would mean there is no actual difference. -0.0 means there is a difference, but so small that it is rounded to 0.0
