title: Compare two rows in a table in PowerBI
body: <p>Need your assistance for the below query.</p>
  
  <p>I have one table that is fetched in PowerBI as below</p>
  
  <pre><code>ID  MessageId   Eventtype   Timestamp       SystemTypeId
  1   101             Pack    14/02/18 00:00      ABC
  2   102             Unpack  14/02/18 00:00      ABC
  3   103             Unpack  14/02/18 01:00      ABC
  4   104             Pack    14/02/18 01:00      ABC
  5   105             Unpack  14/02/18 01:00      ABC
  6   101             Pack    14/02/18 00:00      XYZ
  7   102             Unpack  14/02/18 00:00      XYZ
  8   104             Pack    14/02/18 01:00      XYZ
  9   105             Pack    14/02/18 01:00      XYZ
  </code></pre>
  
  <p>I want to compare the rows with the same MessageID.</p>
  
  <p>For example: I am comparing MessageID 101, then all the values like Eventtype, Timestamp, System are matching for both the systems i.e. ABC and XYZ.</p>
  
  <p>But for the MessageID 105 the value for Eventtype is not matching or both the systems i.e. ABC and XYZ hence this message will not be counted as a MATCH message.
  Finally i want to show it on the dashboard as</p>
  
  <pre><code>14/02/18 00:00            14/02/18 01:00
  Count of Messages        Count of Messages
  FSS3         OER          FSS3       OER
  
  2              2          3           1
  </code></pre>
  
  <p>I require a flag across the above table that will help me to obtain the above result in PowerBI.</p>
  
  <p>Can you please assist me with the same.</p>
  
  <p>Thank you so much in advance.</p>