title: IF Statement in a calculated field (SSAS Tabular)
body: <p>I'm in the process of creating a tabular model cube in SSAS and I've become a bit stuck on some of my measures for the calculated columns</p>
  
  <p>I have already converted this case statement to an IF in SSAS</p>
  
  <pre><code>case when PROPERTY_CHARGE.PCH_CURRENT_IND='Y' then PROPERTY_CHARGE.PCH_AMT  else 0 end
  </code></pre>
  
  <p>is now</p>
  
  <pre><code>=If ([PCH_CURRENT_IND]="Y", [PCH_AMT],0)
  </code></pre>
  
  <p>I'm now struggling to convert this one:</p>
  
  <pre><code>  sum(case when PROPERTY_CHARGE.PCH_CURRENT_IND='N' and PROPERTY_CHARGE.PCH_END_DATE is null then PROPERTY_CHARGE.PCH_AMT else 0 end
  </code></pre>
  
  <p>I've tried various arrangements but no matter what i'm getting errors either related to is null or AND not being available in this context or other errors advising I have too many arguments.</p>
  
  <p>Can anyone assist please?</p>