Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Index Match - Match row datas with table header

I'm looking for similar function like Index Match- Refer below table. From "Currency" table- I wish to bring exchange rate in "data" table- by matching date and Currency with currency table date and column header- withought pivoting the Currency Table ( As my currency table has 10 years date data)

Excel Equivalent" 

=INDEX($A$3:$D$10,MATCH(G4,$A$3:$A$10,0),MATCH(I4,$A$3:$D$3,0))

 

Sample TablesSample Tables

Result in calculated columnResult in calculated column 

Thank in advance for your help.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Currency Table unpivot no relation nowCurrency Table unpivot no relation now

 

Thanks for help. As suggested by you, I have unpivot the table as below: But unable to write the lookup formulae- As I need to match date as well as currency before picking up the value. Could you help me with the formulae.

 

View solution in original post

9 REPLIES 9
parry2k
Super User
Super User

@Anonymous set relationship between currency and data table on date, where currency table will be on one side of the relationship.

 

Add following column:

 

FX Rate = 
SWITCH(
  DataTable[Currency],
  "OMR", RELATED( CurrencyTable[OMR] ),
  "USD", RELATED( CurrencyTable[USD] ),
  "EURO", RELATED( CurrencyTable[EURO] )
)

This is one way to do this, other way would be to unpivot currency table and then use lookup.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Anyone else know any medoth, where the formulae ready amd match curreny in rows with table headers.


@parry2k wrote:

@Anonymousset relationship between currency and data table on date, where currency table will be on one side of the relationship.

 

Add following column:

 

FX Rate = 
SWITCH(
  DataTable[Currency],
  "OMR", RELATED( CurrencyTable[OMR] ),
  "USD", RELATED( CurrencyTable[USD] ),
  "EURO", RELATED( CurrencyTable[EURO] )
)

This is one way to do this, other way would be to unpivot currency table and then use lookup.

 

 



@parry2k wrote:

@Anonymousset relationship between currency and data table on date, where currency table will be on one side of the relationship.

 

Add following column:

 

FX Rate = 
SWITCH(
  DataTable[Currency],
  "OMR", RELATED( CurrencyTable[OMR] ),
  "USD", RELATED( CurrencyTable[USD] ),
  "EURO", RELATED( CurrencyTable[EURO] )
)

This is one way to do this, other way would be to unpivot currency table and then use lookup.

 

 


 

Anonymous
Not applicable

Hello, how to write measures for above two currency table options?

Will they be more effective or effiecient and consume less computing power?  In my data-what happens every time new data or new data table comes and the currency exchange rate has to be applied. So wish too know out of the four options- i.e. with currency table- calculated column or measure  ,  pivot currency table- calculated column or measure- which one will be the effienct way

Anonymous
Not applicable

Thanks. Great. It helps. Is there any other way that it reads the Currency abreviations like OMR, USD etc and match it. As my table has several currencies and more than 3650 dates.

@Anonymous in thst case you have to unpivot your currency table, to do so, go to query editor, select date column in currency table, right click, and select unpivot other columns. You will get two columns attribute and value, rename those to currency and rate.

 

Once these changes are applied, we don't need to set relationship between currency and sales table but use lookupvalue function, read here about this function.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Thanks a lot.

Anonymous
Not applicable

Currency Table unpivot no relation nowCurrency Table unpivot no relation now

 

Thanks for help. As suggested by you, I have unpivot the table as below: But unable to write the lookup formulae- As I need to match date as well as currency before picking up the value. Could you help me with the formulae.

 

Anonymous
Not applicable

Out of the two method, which method is best and consumes less RAM / more efficient. Thanks

@Anonymous here it is, add a column in data table

 

FX Rate  =
LOOKUPVALUE
( CurrencyTable[Value], CurrencyTable[Date], DataTable[Date], CurrencyTable[Currency], DataTable[Currency] )


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.