0
votes

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 ("transactions"), where:

  • The currency is NOT equal to EUR (e.g. "BTC"),
  • Giving the value equal to a opposite value of "amount", as given in the row with EUR as currency (e.g. +5. Positive for negative and vice versa),
    • 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)
  • The "type" = "trade",
  • In all other cases, I think it would be best to give a value of 0.

In my Fact table screenshot, I manually added the EUR_amt column in Excel to show what I would like to create

(The "Currencies" table just uses the distinct values of the "currency" column in the "transactions" table, via PowerQuery. Not relevant for this question I think)

Many thanks in advance!

-YK

Fact table "transactions"

Overview of tables