If-then-else issues

Having some issues with an if-then-else statement.

This doesnt work:
if sum(d-1, 0, m2) = 0,8108 then sum(d-1, 0, m2) * 1,033 else 0

A work-around:
if sum(d-1, 0, m2) * 100 = 81,08 then sum(d-1, 0, m2) * 1,033 else 0

Q1: Why dont Targit recognise 0,8108 as correct ?

Anyway, the big problem I am facing is when making this a nested statement

Q2: I havent had issues with nested statements before, so I am wondering if changes have been made to the syntax ?

What am I missing here ?
if sum(d-1, 0, m2) * 100 = 81,08 then sum(d-1, 0, m2) * 1,033 else if sum(d-1, 0, m2) * 100 = 86,49 then 1 else 0

Snap of (d-1,,m2):

0

Comments

1 comment
  • Hi Kristoffer,

    I suspect it is a rounding issue - albeit it doesn't explain that it seems to work when multiplied by 100, at least in one case.

    Could you please try this:

    if round(sum(d-1, 0, m2);4) = 0,8108 then sum(d-1, 0, m2) * 1,033 else 0

    If it works for this one, it will probably also work for the nested statement.

    Round modifiers and other modifiers here: https://community.targit.com/hc/en-us/articles/360016972237-Result-modifiers 

    BR / Ole

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post