Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
tschullo
Creator III
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))

View solution in original post

4 Replies
Anonymous
Not applicable

Try replace you expression, whatever it is, with

floor(your expression)

tschullo
Creator III
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))

tschullo
Creator III
Creator III
Author

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