Forum Discussion

RameshSingh's avatar
Qrew Member
2 years ago

Report filter question

I have a multiple choice field which has three options X, Y,Z

I am working on creating a formula field for the dashboard.

The logic is (if it is Y, then Y and if it is X,Z then sum(X,Z) and if it is X,Y,Z, then sum of (X,Y,Z))
Can it be possible to be created in qb natively?



2 Replies

  • I ended up doing a formula text field but it shows me error for using or. 

    Split(List(" ; ",
    If([Flag]="X" , "X + Y"),
    If([Flag]="Y" , "X + Y"),
    If([Flag]="Z", "Z"),
    If([Flag]="X" or "Y" or "Z", "X + Y +Z"),

    • RyanBuschmeyer1's avatar
      Qrew Trainee
      I think you have a loop in your logic:

      If Flag = X, then "X + Y" but then you also have if flag is X or Y or Z... this is a conflict.

      BUT... in these instances you want to user CASE instead of IF

      "Y", Y,

      "X,Y", X + Y,
      "X,Z", X + Z,
      "X,Y,Z", X + Y + Z) 

      etc... it is basically a "for each of these this"

      Ryan Buschmeyer