title: Date comparison in power bi dax
body: <p>I had a problem with my code. It returns the below error:
  DAX comparison operates do not support comparing values of type date with values of type text.</p>
  
  <p>Basically, I want to count rows based on some conditions. And I know there is a need to convert the data type, but I am not sure how to do it.</p>
  
  <pre><code>Total Open Issues = 
  --------------------
  --basic info
  VAR SELECTEDDATE =
      DATEVALUE(SELECTEDVALUE(Calender[FullDateAlternateKey].[Date]))
  --------------------
  --FIND the relvent data
  VAR rlvttable =
      calculatetable(
      Tracker,
      Tracker[Catagory]="ISSUE",
      DATEVALUE(Tracker[ClosedDate])&gt;SELECTEDDATE
         ||Tracker[ClosedDate]=""
      )
  --------------------
  --Results
  Return
      countrows(rlvttable)
  </code></pre>
  
  <p>Anyone could advise me how to correct it? Thanks~</p>