title: how to create a DAX measure / power query process / which returns a value from another row, which has the same date & time
body: <p>Please find below links to the Fact table and the overview of all tables. I would like to create a  DAX measure, or new column in the Fact table (&quot;transactions&quot;), where:</p>
  <ul>
  <li>The currency is NOT equal to EUR (e.g. &quot;BTC&quot;),</li>
  <li>Giving the value equal to a opposite value of &quot;amount&quot;, as given in the row with EUR as currency (e.g. +5. Positive for negative and vice versa),
  <ul>
  <li>Where the date and time of the two rows (EUR and non-EUR) have the same values (e.g. 03/11/2021 and 12:28:06)</li>
  </ul>
  </li>
  <li>The &quot;type&quot; = &quot;trade&quot;,</li>
  <li>In all other cases, I think it would be best to give a value of 0.</li>
  </ul>
  <p><strong>In my Fact table screenshot, I manually added the EUR_amt column in Excel to show what I would like to create</strong></p>
  <p>I think it's also possible to add the column, then group by time and date, such that the rows with EUR as currency with EUR_amt being 0, would be removed. All using power query. That would be even better.</p>
  <p>(The &quot;Currencies&quot; table just uses the distinct values of the &quot;currency&quot; column in the &quot;transactions&quot; table, via PowerQuery. Not relevant for this question I think)</p>
  <p>Many thanks in advance!</p>
  <p>-YK</p>
  <p><strong>Fact table &quot;transactions&quot;</strong><br>
  <a href="https://i.stack.imgur.com/ISXyY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ISXyY.png" alt="Fact table &quot;transactions&quot;" /></a></p>
  <p><strong>Overview of tables</strong><br>
  <a href="https://i.stack.imgur.com/UDFkg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UDFkg.png" alt="Overview of tables" /></a></p>