Maximum conditions in Switch statement in Tableau-Excel connection
<p>I am working on a SQL in Tableau Desktop for extracting data from an Excel spreadsheet.</p>

<p>I have 125 subject codes to be categorized in 24 different departments.</p>

<p>I am using "Switch" statement for the same. The query works perfectly fine if I enter 13 different cases, however, it gives me below error when I try to input more than 13 cases. </p>

<blockquote>
  <p><em>Database error 0x80040E14: Expression too complex in query expression 'Switch([Subjectcode] in ("21:003"),"AF",[Subjectcode] in
  ("21:080","21:082","21:089","26:561"),"ACM",[Subjectcode] in
  ("21:014"),"AAAF",[Subjectcode] in ('.</em></p>
</blockquote>

<p>Is there a limit for the number of cases that can be input to the Switch statement?</p>

<p>Please Note: I cannot use "IF..ELSE" statements as the Microsoft Jet Engine doesn't allow me to do the same in Tableau.</p>