Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change text format of values only for data points

I have a stacked bar chart with 3 decimal values. They all add upto 100. I am displaying these values on the bar as data points. But I don't want to show the decimal portion of these values, so I created an expression to Round these values. But when I do that, sometimes the total exceeds 100. How can I change the data point display to the rounded values, but use the actual value while calculating the height(total) of the bar?

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni


Hi,

You can set this by using

Chart Properties -> Number -> Select Expression and Set Integer

If it not working then upload the data that you are working.

Sometimes while rounding off your numbers may exceed 100, because 0.55 is rounded to 1, may be because of this the total may exceed 100.

Hope this helps you.

Regards,

Jagan.

View solution in original post

8 Replies
jagan
Luminary Alumni
Luminary Alumni


Hi,

You can set this by using

Chart Properties -> Number -> Select Expression and Set Integer

If it not working then upload the data that you are working.

Sometimes while rounding off your numbers may exceed 100, because 0.55 is rounded to 1, may be because of this the total may exceed 100.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

That setting rounds off the number as well. I have these values

4.9458000    85.9261000    9.1280000   

82.5788000    8.5442000    8.8771000   

These round off to

5     86     9     = 100

83     9     9     = 101

Because of this, the chart's bars are not of the same height. But they should be. I want to use the full decimal value in the calculation of that bar height.

Not applicable
Author

Can you upload an example ?,

Josh_Good
Employee
Employee

I am not experiencing the same issue with my little sample.  Can you please post what you are seeing.

Not applicable
Author

This is my generated chart.

Capture.PNG.png

Not applicable
Author

Hope this helps i just used teh Round out of the Sum , and the texts had the round inside ,,

REPOST ....

HERE YOU GOT AN EXAMPLE, HOPE THIS HELPS

Regards!!

Josh_Good
Employee
Employee

This is correct.   Everything is rounding correctly.  The fact that when you add up the numbers being displayed you do not get exact numbers is what happens when you round.  Are you suggesting that the bottom bar should display 9,9 and 82?  That would be mathematically incorrect and misleading.  If you need more precision in your results then add decimal places.

Not applicable
Author

Thanks everyone. I hasn't removed the Round function from the expressions. Thats why even after fixing the Number presentation, I was seeing the wrong height.