textqlikviewqliksenseqlik-expression

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)

)

Solution

  • Try only putting the formatting around the solution

    =num(
        if(SUM(EM)>= 400000,
    
            ((SUM(EM)-400000)*0.0118+12000)/count(DISTINCT PersonId),
    
            SUM(EM)*0.03/count(DISTINCT PersonId)
         )
     ,'€ #.##0')