
Contributor II
2022-06-09
02:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rounding up text in Qlikview
I am trying to round up the outcome of the text below. I know the € #.##0
probably needs to be placed at the ends, but I can not get it to work icw to the brackets etc. Thank you in advance.
=if(SUM(EM)>= 400000,
num((((SUM(EM)-400000)*0.0118)+12000),'€ #.##0')/count(DISTINCT PersonId),
num(SUM(EM)*0,03,'€ #.##0')/count(DISTINCT PersonId)
)
509 Views
2 Replies


MVP
2022-06-09
04:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
num() doesn't round else formats a value and it must be the most outside-part of an expression to get to applied. If really a rounding is needed you may use round/ceil/floor. Further the second multiplicator is wrongly set (comma instead a dot as decimal-delimiter and the expression is more complex as needed and might be look like:
=num(if(SUM(EM)>= 400000,
(((SUM(EM)-400000)*0.0118)+12000), SUM(EM)*0.03)/count(DISTINCT PersonId)
,'€ #.##0')
- Marcus
486 Views

Contributor II
2022-06-10
01:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Round() returns the result of rounding x up or down to the nearest multiple of step [+ offset]. The default value of offset is 0. The default value of step is 1. HCA Rewards Login
472 Views
