0

I am using the following expression in Qlikview:

=Num((if(SUM(EF)>= 100, num((((SUM(EF)-100)*0.0118)+12000), num(SUM(EF)*0,03,)))))

I want to round the number. Like '€ #.##0'. How/where do I insert this into the expression? Can't seem to get it to work. Thanks in advance!

TimLer
  • 1,320
  • 2
  • 16
  • and just to mention a couple of things. 1) no need to put `num()` in front of all calculations. if the field is number (and qlik recognise it as number) then `num()` is not needed. 2) it is probably better to split this expression into two expressions and add calculation conditions for both. Based on the initial calculation `SUM(EF)>= 100`. Qlik will evaluate all calculations inside the expression. If your data is large and the data model is complicated then having all calculations in one expression will be significantly slower than having 2 expressions with calculation condition – Stefan Stoichev Aug 12 '21 at 08:23

1 Answers1

1

The formatting is controlled through the Number section in the Properties. Choose the expression that needs to be formatted and choose the format (Number, Money, Date etc). At this point Qlik will apply default formatting. The default format can be changed through Format Pattern input.

Number properties

Another way is to define your format in the expression itself. The Num function accept formatting as optional parameter. For example: Num(1000, '#,##0'). If you have the formatter in the expression then in the Number properties select Expression Default

Stefan Stoichev
  • 4,615
  • 3
  • 31
  • 51