Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
KimFerguson
Contributor II
Contributor II

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)

)

 Culver's Guest Satisfaction Survey
 

Labels (1)
  • Other

2 Replies
marcus_sommer

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

Daniel044
Contributor II
Contributor II

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