Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for
Did you mean:
Creator III

## Truncate decimals for display only - sum real numbers top row

I have a chart with sales people and number of units moved.

The business is asking that where two sales people collaborated on sales, the chart show the split in the numbers next to their name.

So for example if Bob and Ted sold 100 units, the chart would look like this:

100

Bob     50

Ted     50

The issue is that when the total units is 101, they would like to see, essentially:

101

Bob     50

Ted     50

How can I force the format to truncate decimals without changing the actual value behind the scenes?

1 Solution

Accepted Solutions
Anonymous
Not applicable

I thought this is what you wanted(?)

Bob - 50.5.  so, floor(50.5) = 50

Same for Ted.

Total floor(101) = 101.

If you total to be 100 in this case, probably this

sum(aggr(floor(...),Name))

4 Replies
Anonymous
Not applicable

Try replace you expression, whatever it is, with

Creator III
Author

I did that, I think the missing piece was to have the totals be by expression rather than sum rows. That way the total was still 101 instead of 100.

Thanks!

Anonymous
Not applicable

I thought this is what you wanted(?)

Bob - 50.5.  so, floor(50.5) = 50

Same for Ted.

Total floor(101) = 101.

If you total to be 100 in this case, probably this

sum(aggr(floor(...),Name))

Creator III
Author

Yes, I just needed to change the totals settings to use the expression, instead of adding the row values.

Community Browser