Powerpivot -> Measures for Multiple currency mapping between two tables

kharemanas

New Member
Joined
Mar 18, 2015
Messages
2
Hi,
I have two tables - one having data with sales for multiple countries and currency combination and another having the USD conversion rate for each currency. I would like my pivot to have all the figures in USD.

Using normal excel, i'd vlookup the conversion factor into my main table and then create a USD column by multiplying the conversion factor with the sales figures.

I believe this can be achieved through powerpivot as well and it would give me the flexibility later as I have conversion factor for 2014 and 2015, which I would want to have the flexibility to chose from.

However, I tried it and am unable to get it working right.

Any ideas how to go about it in powerpivot?
regs
Manas
 
Last edited:

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
You could just add a calculated column to your Sales table that calculates the USD equivalent of teh amount, something like

USDAmount: =[Amount]/RELATED(Currency[Rate])

Depending upon your tables, you might need to create a composite date/currency calculated columns on both the Sales and Currency tables, and then join on those composite keys, such as this

CcyKey: =[Ccy]&FORMAT([Date],"yyyymmdd")

You can then just aggregate pull USDAmount into your pivot.
 
Upvote 0
Great. Works fine. Thanks so much.

Just out of curiosity - is there a way to do it via calculated formula in powerpivot rather than adding a column in the base data?
 
Upvote 0
I don't think it is the best way, but assuming the same layout as I used above, you could use

Code:
USDAmount:=IF( HASONEVALUE( Sales[CcyKey] ),
    SUMX(
         Sales,
         Sales[Amount] / CALCULATE( 
                                       MIN( 
                                           Currency[Rate] 
                                        ) 
                                    )
     ),
     BLANK()
 )
 
Last edited:
Upvote 0
You probably don't need the IF(HASONEVALUE(... if your keys enfoirce a 1-1 joiun and you don't show the exchange rate in the query, so you could just use

Code:
USDAmount:=SUMX(
     Sales,
     Sales[Amount] * CALCULATE( 
                         MIN( 
                              Currency[Rate] 
                             ) 
                     )
 )
 
Upvote 0

Forum statistics

Threads
1,215,220
Messages
6,123,694
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top