title: DAX Measure IF statement with Variables
body: <p>I have a dax measure that adds a thousands separator to my card totals in Power BI, converting them to a string (I am also including a currency symbol in another measure to the same card which is why it needs to be a string).</p>
  
  <p>I want to add an if statement that will say if the total amount is &lt; 1000, then remove the thousands separator from the total. Currently numbers like £500 appear with the separator before the total e.g.<br>
  ,£500. Here is the code:</p>
  
  <pre><code>Card Total = 
  VAR right =
      RIGHT ( [Total Amount], 3 )
  VAR left =
      SUBSTITUTE ( [Total Amount] , right, "" )
  RETURN
      COMBINEVALUES ( ",", left, right )
  </code></pre>