Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Multi conditional switch statement

Hello  -  I have a situaiton where I have a Switch statment that only partially works.    I am curious if there is a better way to write this (that actually works!) or perhaps use  VAR.      My use...
  • Greg_Deckler's avatar
    Greg_Deckler
    6 years ago

    One more ) right before your RETURN statement

     

    Multiple or Single = 
      VAR __Table = 
        DISTINCT(
          SELECTCOLUMNS(
            FILTER(
              ALL('Table'),
              [RMA] = EARLIER([RMA])
            ),
            "__Problem Code",[Problem Code]
          )
        )
    RETURN
      IF(COUNTROWS(__Table) > 1,"Multiple","Single")