Forum Discussion

sabin_arsenal's avatar
6 years ago
Solved

calculate function (IF AND THEN)

needHello, wondering if anyone could help calculate the following logic for me in dax (not a coder)   thanks much in advance   IF C_O>=0, then calculate -(U_P)-(B_Y)+(L_W)   ELSE  CALCULATE -...
  • Greg_Deckler's avatar
    6 years ago

    Your psuedo-code is pretty close actually:

     

    expected value column =
      IF(
        [C_O] >= 0,
        -1*[U_P] - [B_Y] + [L_W],
        -1*[U_P] + [B_Y] + [L_W]
      )