Discussions

 View Only
  • 1.  Help with an IF statement when using two fields

    Posted 07-18-2018 12:46
    I have two different fields that I would prefer to combine into one so I can use it as a default filter more easily.  I am struggling to get it to work and could use some advise.  Here is the basic formula in each field:

    Question A Status= If(([Question A])<>"","Question A Only", "Question A Not Answered")
    Question B Status= If(([Question B])<>"","Question B Only", "Question B Not Answered")

    Is it possible to combine these into one formula (I've tried but it is not working for me)?  If Question A or B are blank I really do not need a value -- I would rather it not auto-fill "blank", but I can't seem to get it to ignore it.  Any help is appreciated.  Should I be using Case instead of IF statement?

    Thanks in advance!


  • 2.  RE: Help with an IF statement when using two fields

    Posted 07-18-2018 14:58
    Please provide the desired result if the user enters:

    Q1 only
    Q2 only
    Q1 and Q2 both
    nothing


  • 3.  RE: Help with an IF statement when using two fields

    Posted 07-18-2018 15:03
    If the user answers only one or the other then it would display:

    Q1 only -- would only display Question 1 answered 
    Q2 only -- would only display Question 2 answered

    If neither question answered it should be excluded.
    If both questions answered, it is already covered by the above when both options are selected in the report.  Does this make sense?


  • 4.  RE: Help with an IF statement when using two fields

    Posted 07-18-2018 15:14
    Try this
    List("\n",
    IF(Trim([Question A])<>"", "Question A Answered"),
    IF(Trim([Question B])<>"", "Question B Answered"))