Search code examples
powerbimany-to-manydaxmeasure

I want Power BI DAX measure


Hi My Transaction Table,

Transaction Table
User Transaction Country Cost To Region A AUD 100 Nok A CHF 200 EUR A DKK 300 EUR A EUR 400 EUR B AUD 400 DKK B CHF 500 DKK B DKK 600 DKK B EUR 600 GBB

enter image description here

Exchange rate Table,

Exchange Rate
Country Rate Region Date AUD 4.73 DKK 28.02.2023 CHF 7.49 DKK 28.02.2023 DKK 1.00 DKK 28.02.2023 AUD 0.64 EUR 28.02.2023 CHF 1.01 EUR 28.02.2023 DKK 0.13 EUR 28.02.2023 AUD 0.56 GBP 28.02.2023 CHF 0.88 GBP 28.02.2023 DKK 0.12 GBP 28.02.2023 EUR 1.00 EUR 28.02.2023

enter image description here

My expected result

enter image description here

How do i achieve this in power bi dax

I have tried in power query editor merge but it didnt help as expected. i want this in power bi dax measure


Solution

  • First you have to each declare variables for Region and country then declare a variable to match the exchange rate, then return as per exchange rate variable.